<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>roster_core Package &mdash; Roster Core v0.18 documentation</title>
    
    <link rel="stylesheet" href="_static/default.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     'v0.18',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="top" title="Roster Core v0.18 documentation" href="index.html" />
    <link rel="prev" title="Welcome to Roster Core’s documentation!" href="index.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="index.html" title="Welcome to Roster Core’s documentation!"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">Roster Core v0.18 documentation</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="roster-core-package">
<h1>roster_core Package<a class="headerlink" href="#roster-core-package" title="Permalink to this headline">¶</a></h1>
<div class="section" id="id1">
<h2><tt class="xref py py-mod docutils literal"><span class="pre">roster_core</span></tt> Package<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h2>
<span class="target" id="module-roster_core.__init__"></span><p>Toplevel RosterCore API.  This presents entities to external consumers.</p>
<dl class="exception">
<dt id="roster_core.__init__.CoreError">
<em class="property">exception </em><tt class="descclassname">roster_core.__init__.</tt><tt class="descname">CoreError</tt><a class="headerlink" href="#roster_core.__init__.CoreError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p>
<p>Error class that all Roster errors are 
sub-classed from</p>
</dd></dl>

<dl class="class">
<dt id="roster_core.__init__.Core">
<em class="property">class </em><tt class="descclassname">roster_core.__init__.</tt><tt class="descname">Core</tt><big>(</big><em>user_name</em>, <em>config_instance</em>, <em>unittest_timestamp=None</em>, <em>parent_server_instance=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>Backend Roster interface.</p>
<p>This class is meant to be the only interface to the database for top
level programming for a web or xml-rpc interface, or anything else
that would need to talk to the database.</p>
<p>All errors raised will be a subclass of CoreError.</p>
<dl class="method">
<dt id="roster_core.__init__.Core.BootstrapZone">
<tt class="descname">BootstrapZone</tt><big>(</big><em>zone_name</em>, <em>zone_type</em>, <em>zone_origin</em>, <em>view_name</em>, <em>zone_bootstrap_dict</em>, <em>zone_options=None</em>, <em>make_any=True</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.BootstrapZone" title="Permalink to this definition">¶</a></dt>
<dd><p>Generates SOA and NS records for a zone.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd><blockquote class="first">
<div><dl class="docutils">
<dt>zone_bootstrap_dict: dictionary containing between 0 and 2 keys </dt>
<dd>&#8216;admin_email&#8217; and &#8216;name_server&#8217; if either 
of those keys are omitted, then their corresponding
values are &#8216;generated&#8217; by this method.</dd>
</dl>
</div></blockquote>
<p>zone_name: string of zone name
zone_type: string of zone type
zone_origin: string of zone origin. ex dept.univiersity.edu.
zone_options: string of zone_options(defaults to empty string)</p>
<blockquote>
<div><dl class="docutils">
<dt>valid zone options can be found here:</dt>
<dd><a class="reference external" href="http://www.bind9.net/manual/bind/9.3.2/Bv9ARM.ch06.html#zone_statement_grammar">http://www.bind9.net/manual/bind/9.3.2/Bv9ARM.ch06.html#zone_statement_grammar</a></dd>
</dl>
</div></blockquote>
<dl class="docutils">
<dt>view_name: string of view name(defaults to &#8216;any&#8217;)</dt>
<dd>see docstring of MakeViewAssignments as to why &#8216;any&#8217; is default</dd>
</dl>
<p class="last">make_any: regardless of view name, make any as well(default to True)</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.CheckMaintenanceFlag">
<tt class="descname">CheckMaintenanceFlag</tt><big>(</big><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.CheckMaintenanceFlag" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks maintenance flag</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd>bool: value of flag on or off</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.GetEmptyRecordArgsDict">
<tt class="descname">GetEmptyRecordArgsDict</tt><big>(</big><em>record_type</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.GetEmptyRecordArgsDict" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets record args dict for the record_type.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>record_type: string of record type (example: u&#8217;mx&#8217;)</dd>
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>dictionary: which is different for each record type.</dt>
<dd><dl class="first last docutils">
<dt>(example: {u&#8217;priority&#8217;: 10,</dt>
<dd>u&#8217;mail_server&#8217;: &#8216;mail.sub.university.edu.&#8217;})</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.ListACLs">
<tt class="descname">ListACLs</tt><big>(</big><em>acl_name=None</em>, <em>cidr_block=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.ListACLs" title="Permalink to this definition">¶</a></dt>
<dd><p>List one or many acls, if all args are none it will them all, or just
search on one more terms.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>acl_name: string of acl name
cidr_block: string of valid CIDR block or IP address</dd>
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>dictionary: keyed by the acl name whos value is a list dictionaries with</dt>
<dd><blockquote class="first">
<div>the cidr block and range allowed values.</div></blockquote>
<dl class="last docutils">
<dt>example: {&#8216;rfc_1918_networks&#8217;:   [{&#8216;cidr_block&#8217;: &#8216;192.168/16&#8217;},</dt>
<dd><blockquote class="first">
<div>{&#8216;cidr_block&#8217;: &#8216;10/8&#8217;}],</div></blockquote>
<dl class="last docutils">
<dt>&#8216;university_networks&#8217;: [{&#8216;cidr_block&#8217;: &#8216;1.2.3/24&#8217;},</dt>
<dd>{&#8216;cidr_block&#8217;: &#8216;1.1.1/24&#8217;}]}</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.ListAuditLog">
<tt class="descname">ListAuditLog</tt><big>(</big><em>user_name=None</em>, <em>action=None</em>, <em>success=None</em>, <em>begin_timestamp=None</em>, <em>end_timestamp=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.ListAuditLog" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists audit log</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>user_name: string of user name
action: string of function
success: intbool of success
begin_timestamp: datetime object of beginning timestamp
end_timestamp: datetime object of ending timestamp</dd>
<dt>Raises:</dt>
<dd>UnexpectedDataError: Missing begin_timestamp or end_timestamp.</dd>
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>dict: Dictionary of audit log</dt>
<dd><dl class="first last docutils">
<dt>ex: {&#8216;action&#8217;: u&#8217;Action&#8217;, &#8216;data&#8217;, u&#8217;Data&#8217;,</dt>
<dd>&#8216;audit_log_timestamp&#8217;: datetime.datetime,
&#8216;audit_log_user_name&#8217;: u&#8217;username&#8217;}</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.ListCredentials">
<tt class="descname">ListCredentials</tt><big>(</big><em>credential=None</em>, <em>user_name=None</em>, <em>infinite_cred=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.ListCredentials" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists infinte credentials.</p>
<p>This function basically just calls _ListCredentials but runs Authorize
before.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>credential: string of specific credential that is being searched for
user_name: string of name of user that is being searched for
infinite_cred: bool of search for infinite or non infinite creds</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.ListDnsServerSetAssignments">
<tt class="descname">ListDnsServerSetAssignments</tt><big>(</big><em>dns_server_name=None</em>, <em>dns_server_set_name=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.ListDnsServerSetAssignments" title="Permalink to this definition">¶</a></dt>
<dd><p>List dns server set assignments.
Inputs:</p>
<blockquote>
<div>dns_server_name: string of dns server name
dns_server_set_name: string of dns server set name</div></blockquote>
<dl class="docutils">
<dt>Outputs:</dt>
<dd>dictionary keyed by server sets.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.ListDnsServerSetViewAssignments">
<tt class="descname">ListDnsServerSetViewAssignments</tt><big>(</big><em>view_name=None</em>, <em>dns_server_set_name=None</em>, <em>key_by_view=False</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.ListDnsServerSetViewAssignments" title="Permalink to this definition">¶</a></dt>
<dd><p>List dns server set view assignments</p>
<p>Assignments can be given as a dictionary of dns server names with lists of
view names or as a dictionary of view names with lists of dns server names.</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd><p class="first">Dictionary keyed by view name or dns server set name with values of
lists of tuples of view_name or dns_server_sets with view_order and 
view options as the second and third members of the tuple.</p>
<blockquote class="last">
<div><dl class="docutils">
<dt>example keyed by view_name:</dt>
<dd><dl class="first last docutils">
<dt>{&#8216;view1&#8217;: [(&#8216;set1&#8217;, 1, u&#8217;some_view_option;&#8217;), </dt>
<dd><blockquote class="first">
<div>(&#8216;set2&#8217;, 2, u&#8217;&#8216;)],</div></blockquote>
<p class="last">&#8216;view2&#8217;: [(&#8216;set2&#8217;, 2, u&#8217;&#8216;)]}</p>
</dd>
</dl>
</dd>
<dt>example keyed by dns_server_set_name:</dt>
<dd><dl class="first last docutils">
<dt>{&#8216;set1&#8217;: [(&#8216;view1&#8217;, 1, u&#8217;some_view_option;&#8217;)]</dt>
<dd><dl class="first last docutils">
<dt>&#8216;set2&#8217;: [(&#8216;view1&#8217;, 1, u&#8217;&#8216;), </dt>
<dd>(&#8216;view2&#8217;, 1, u&#8217;&#8216;)]}</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</div></blockquote>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.ListDnsServerSets">
<tt class="descname">ListDnsServerSets</tt><big>(</big><em>dns_server_set_name=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.ListDnsServerSets" title="Permalink to this definition">¶</a></dt>
<dd><p>List all dns server sets</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>dns_server_set_name: string of dns server set name</dd>
<dt>Outputs:</dt>
<dd>list of dns server sets</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.ListDnsServers">
<tt class="descname">ListDnsServers</tt><big>(</big><em>dns_server_name=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.ListDnsServers" title="Permalink to this definition">¶</a></dt>
<dd><p>List dns servers.</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>dictionary: dictionary of server metadata keyed by server the name.</dt>
<dd><dl class="first last docutils">
<dt>example:</dt>
<dd><dl class="first last docutils">
<dt>{u&#8217;dns1&#8217;: {</dt>
<dd>&#8216;ssh_username&#8217;: u&#8217;user&#8217;,
&#8216;bind_dir&#8217;: u&#8217;/etc/bind/&#8217;,
&#8216;test_dir&#8217;: u&#8217;/etc/bind/test&#8217;}}</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.ListForwardZonePermissions">
<tt class="descname">ListForwardZonePermissions</tt><big>(</big><em>zone_name=None</em>, <em>group_name=None</em>, <em>group_permission=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.ListForwardZonePermissions" title="Permalink to this definition">¶</a></dt>
<dd><p>List forward zone permissions.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_name: string of zone name
group_name: string of group name
group_permission: list group permissions, i.e., [&#8216;a&#8217;, &#8216;aaaa&#8217;, &#8216;cname&#8217;]</dd>
<dt>Outputs:</dt>
<dd><p class="first">dictionary keyed by group name with values of lists of dictionaries
containing zone names and group permissions</p>
<blockquote class="last">
<div><dl class="docutils">
<dt>example: {&#8216;dept&#8217;: [{&#8216;zone_name&#8217;: &#8216;sub.univeristy.edu&#8217;,</dt>
<dd><blockquote class="first">
<div><blockquote>
<div>&#8216;group_permission&#8217;: [&#8216;a&#8217;, &#8216;aaaa&#8217;, &#8216;cname&#8217;]},</div></blockquote>
<dl class="docutils">
<dt>{&#8216;zone_name&#8217;: &#8216;othersub.university.edu&#8217;,</dt>
<dd>&#8216;group_permission&#8217;: [&#8216;a&#8217;, &#8216;aaaa&#8217;, &#8216;cname&#8217;, &#8216;soa&#8217;]}],</dd>
</dl>
</div></blockquote>
<dl class="last docutils">
<dt>&#8216;otherdept&#8217;: [{&#8216;zone_name&#8217;: &#8216;sub.university.edu&#8217;,</dt>
<dd>&#8216;group_permission&#8217;: [&#8216;a&#8217;, &#8216;aaaa&#8217;]}]}</dd>
</dl>
</dd>
</dl>
</div></blockquote>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.ListGroups">
<tt class="descname">ListGroups</tt><big>(</big><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.ListGroups" title="Permalink to this definition">¶</a></dt>
<dd><p>List all groups.</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>list of groups</dt>
<dd>example [&#8216;cs&#8217;, &#8216;bio&#8217;]</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.ListNamedConfGlobalOptions">
<tt class="descname">ListNamedConfGlobalOptions</tt><big>(</big><em>option_id=None</em>, <em>dns_server_set=None</em>, <em>timestamp=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.ListNamedConfGlobalOptions" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists named conf global options</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>option_id: integer of named conf global option id
dns_server_set: string of the dns server set name
timestamp: datetime object of timestamp to search</dd>
<dt>Outputs:</dt>
<dd>named_conf_list: list of named conf global options</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.ListRecordArgumentDefinitions">
<tt class="descname">ListRecordArgumentDefinitions</tt><big>(</big><em>record_type=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.ListRecordArgumentDefinitions" title="Permalink to this definition">¶</a></dt>
<dd><p>List record argument definitions. This is mainly for the exporter to
programtically construct records for exporting.</p>
<p>This function is duplicated in
roster-config-manager/roster_config_manager/tree_exporter.py</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>record_type: string of record type</dd>
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>dictionary keyed by record type with values of lists</dt>
<dd><p class="first">of lists of record arguments sorted by argument order.
example: {&#8216;mx&#8217;: [{&#8216;argument_name&#8217;: u&#8217;priority&#8217;,</p>
<blockquote class="last">
<div><blockquote>
<div>&#8216;record_arguments_type&#8217;: u&#8217;mx&#8217;,
&#8216;argument_data_type&#8217;: u&#8217;UnsignedInt&#8217;,
&#8216;argument_order&#8217;: 0},</div></blockquote>
<p>{&#8216;argument_name&#8217;: u&#8217;mail_server&#8217;,
&#8216;record_arguments_type&#8217;: u&#8217;mx&#8217;,
&#8216;argument_data_type&#8217;: u&#8217;Hostname&#8217;,
&#8216;argument_order&#8217;: 1}]}</p>
</div></blockquote>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.ListRecords">
<tt class="descname">ListRecords</tt><big>(</big><em>record_type=None</em>, <em>target=None</em>, <em>zone_name=None</em>, <em>view_name=None</em>, <em>ttl=None</em>, <em>record_args_dict=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.ListRecords" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists records.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd><p class="first">record_type: string of record type (example: u&#8217;mx&#8217;)
target: string of target (example u&#8217;machine-01.sub.univeristy.edu.&#8217;)
zone_name: string of zone name (example u&#8217;sub.university.edu&#8217;)
ttl: int of time to live per record
view_name: string of view name (example u&#8217;internal&#8217;)
record_args_dict: dictionary, which is different for each record type.</p>
<blockquote class="last">
<div><p>an example dictionary can be obtained with the
GetEmptyRecordArgsDict function in this class
(example: {u&#8217;priority&#8217;: 10,</p>
<blockquote>
<div>u&#8217;mail_server&#8217;: &#8216;mail.sub.university.edu.&#8217;})</div></blockquote>
</div></blockquote>
</dd>
<dt>Raises:</dt>
<dd>UnexpectedDataError: Must specify record_type with record_args_dict.</dd>
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>list of record dictionaries</dt>
<dd><p class="first">Each dictionary can have different args depending on record type.
All of them will include record_type, target, zone_name, ttl, and
view_name regardless of record type. Below is an example of an mx
record search.
example: [{&#8216;record_type&#8217;: &#8216;mx&#8217;, &#8216;target&#8217;: &#8216;university.edu.&#8217;,</p>
<blockquote class="last">
<div><blockquote>
<div>&#8216;zone_name&#8217;: &#8216;university.edu&#8217;, ttl: 3600,
&#8216;view_name&#8217;: &#8216;external&#8217;, &#8216;priority&#8217;: 10,
&#8216;mail_server&#8217;: &#8216;smtp-01.university.edu.&#8217;,
&#8216;last_user&#8217;: &#8216;sharrell},</div></blockquote>
<dl class="docutils">
<dt>{&#8216;record_type&#8217;: &#8216;mx&#8217;, &#8216;target&#8217;: &#8216;university.edu.&#8217;,</dt>
<dd>&#8216;zone_name&#8217;: &#8216;university.edu&#8217;, ttl: 3600,
&#8216;view_name&#8217;: &#8216;external&#8217;, &#8216;priority&#8217;: 20,
&#8216;mail_server&#8217;: &#8216;smtp-02.university.edu.&#8217;},
&#8216;last_user&#8217;: &#8216;sharrell}]</dd>
</dl>
</div></blockquote>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.ListReservedWords">
<tt class="descname">ListReservedWords</tt><big>(</big><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.ListReservedWords" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists reserved words.</p>
<dl class="docutils">
<dt>Output:</dt>
<dd><dl class="first last docutils">
<dt>list: list of reserved words</dt>
<dd>ex: [&#8216;reservedword1&#8217;, &#8216;reservedword2&#8217;]</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.ListReverseRangePermissions">
<tt class="descname">ListReverseRangePermissions</tt><big>(</big><em>cidr_block=None</em>, <em>group_name=None</em>, <em>group_permission=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.ListReverseRangePermissions" title="Permalink to this definition">¶</a></dt>
<dd><p>List reverse range permissions.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>cidr_block: string of cidr block
group_name: string of group name
group_permission: list group permissions, i.e., [&#8216;a&#8217;, &#8216;aaaa&#8217;, &#8216;cname&#8217;]</dd>
<dt>Outputs:</dt>
<dd><p class="first">dictionary keyed by group name with values of lists of dictionaries
containing reverse ranges and group permissions</p>
<blockquote class="last">
<div><dl class="docutils">
<dt>example: {&#8216;dept&#8217;: [{&#8216;cidr_block&#8217;: &#8216;192.168.0/24&#8217;,</dt>
<dd><blockquote class="first">
<div><blockquote>
<div>&#8216;group_permission&#8217;: [u&#8217;cname&#8217;, u&#8217;ptr&#8217;]},</div></blockquote>
<dl class="docutils">
<dt>{&#8216;cidr_block&#8217;: &#8216;192.168.1/24&#8217;,</dt>
<dd>&#8216;group_permission&#8217;: [u&#8217;ptr&#8217;]}],</dd>
</dl>
</div></blockquote>
<dl class="last docutils">
<dt>&#8216;otherdept&#8217;: [{&#8216;cidr_block&#8217;: &#8216;192.168.1/24&#8217;,</dt>
<dd><dl class="first last docutils">
<dt>&#8216;group_permission&#8217;: [u&#8217;cname&#8217;, u&#8217;ns&#8217;, u&#8217;ptr&#8217;,</dt>
<dd>u&#8217;soa&#8217;]}]}</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</div></blockquote>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.ListReverseRangeZoneAssignments">
<tt class="descname">ListReverseRangeZoneAssignments</tt><big>(</big><em>zone_name=None</em>, <em>cidr_block=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.ListReverseRangeZoneAssignments" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists reverse range to zone assignments.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_name: string of zone name
cidr_block: string of cidr block</dd>
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>dictionary: keyed by zone_name with values of cidr blocks</dt>
<dd><dl class="first last docutils">
<dt>example: {&#8216;10.in-addr.arpa&#8217;: &#8216;10/8&#8217;,</dt>
<dd>&#8216;9.168.192.in-addr.arpa&#8217;: &#8216;192.168.9/24&#8217;}</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.ListUserGroupAssignments">
<tt class="descname">ListUserGroupAssignments</tt><big>(</big><em>user_name=None</em>, <em>group_name=None</em>, <em>key_by_group=False</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.ListUserGroupAssignments" title="Permalink to this definition">¶</a></dt>
<dd><p>List user-group assignments.</p>
<p>Assignments can be given as a dictionary of users with lists of groups or
as a dictionary of groups as a list of users.</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd><p class="first">dictionarie keyed by group or user with values of lists of groups or users
depending on key_by_group bool</p>
<blockquote class="last">
<div><dl class="docutils">
<dt>example keyed by user: {&#8216;sharrell&#8217;: [&#8216;cs&#8217;, &#8216;bio&#8217;],</dt>
<dd>&#8216;shuey&#8217;: [&#8216;cs&#8217;]}</dd>
<dt>example keyed by group: {&#8216;cs&#8217;: [&#8216;shuey&#8217;, &#8216;sharrell&#8217;]</dt>
<dd>&#8216;bio&#8217;: [&#8216;sharrell&#8217;]</dd>
</dl>
</div></blockquote>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.ListUsers">
<tt class="descname">ListUsers</tt><big>(</big><em>user_name=None</em>, <em>access_level=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.ListUsers" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists one or many users, if all args are None then list them all.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>user_name: string of user name
access_level: int from 0-255 as defined in user.py</dd>
<dt>Output:</dt>
<dd><dl class="first last docutils">
<dt>dictionary: keyed by the user name with value of access_level.</dt>
<dd><dl class="first last docutils">
<dt>example: {&#8216;sharrell&#8217;: 128,</dt>
<dd>&#8216;shuey&#8217;: 64}</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.ListViewAssignments">
<tt class="descname">ListViewAssignments</tt><big>(</big><em>view_superset=None</em>, <em>view_subset=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.ListViewAssignments" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists view assignments.</p>
<p>For more informaton about view assignments please read the
MakeViewAssignment docstring.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>view_superset: string of view name
view_subset: string of view name</dd>
<dt>Outputs:</dt>
<dd>dictionary keyed by view supersets with values lists of view subsets</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.ListViewDependencies">
<tt class="descname">ListViewDependencies</tt><big>(</big><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.ListViewDependencies" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists all view dependencies.</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd>list: list of view dependencies</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.ListViewToACLAssignments">
<tt class="descname">ListViewToACLAssignments</tt><big>(</big><em>view_name=None</em>, <em>dns_server_set=None</em>, <em>acl_name=None</em>, <em>acl_range_allowed=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.ListViewToACLAssignments" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists some or all view to acl assignments corresponding to the
given args.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>view_name: string of view name
dns_server_set: string of dns_server_set name
acl_name: string of acl name</dd>
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>list: list contains dictionaries of assignments</dt>
<dd><dl class="first last docutils">
<dt>example: [{&#8216;view_name&#8217;: &#8216;main_view&#8217;, &#8216;acl_name&#8217;: &#8216;internal&#8217;,</dt>
<dd><blockquote class="first">
<div>&#8216;acl_range_allowed&#8217;: &#8216;true&#8217;},</div></blockquote>
<dl class="last docutils">
<dt>{&#8216;view_name&#8217;: &#8216;other_view&#8217;, &#8216;acl_name&#8217;: &#8216;external&#8217;,</dt>
<dd>&#8216;acl_range_allowed&#8217;: &#8216;false&#8217;}]</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.ListViews">
<tt class="descname">ListViews</tt><big>(</big><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.ListViews" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists all views.</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd>views_list: List of view names. ex - [u&#8217;test_view_1&#8217;, u&#8217;test_view_2&#8217;]</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.ListZoneTypes">
<tt class="descname">ListZoneTypes</tt><big>(</big><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.ListZoneTypes" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists zone types.</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd>list: list of zone types, example: [&#8216;master&#8217;, &#8216;slave&#8217;, &#8216;forward&#8217;]</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.ListZones">
<tt class="descname">ListZones</tt><big>(</big><em>zone_name=None</em>, <em>zone_type=None</em>, <em>zone_origin=None</em>, <em>view_name=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.ListZones" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists zones.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_name: string of zone name
zone_type: string of zone type
zone_origin: string of zone origin. ex dept.univiersity.edu.
view_name: string of view name</dd>
<dt>Outputs:</dt>
<dd><p class="first">Dictionary of dictionaries. The parent dictionary is keyed by zone name,
the secondary dictionary is keyed by view name and the third is keyed
by type of data.</p>
<blockquote class="last">
<div><dl class="docutils">
<dt>example:</dt>
<dd><dl class="first last docutils">
<dt>{&#8216;zone.university.edu&#8217;: {&#8216;internal&#8217;: {&#8216;zone_type&#8217;: &#8216;master&#8217;,</dt>
<dd><blockquote class="first">
<div><blockquote>
<div><p>&#8216;zone_options&#8217;: &#8216;misc opts&#8217;,
&#8216;zone_origin&#8217;:</p>
<blockquote>
<div>&#8216;university.edu.&#8217;},</div></blockquote>
</div></blockquote>
<dl class="docutils">
<dt>&#8216;any&#8217;: {&#8216;zone_type&#8217;: &#8216;master&#8217;</dt>
<dd>&#8216;zone_options&#8217;: &#8216;other options&#8217;,
&#8216;zone_origin&#8217;: &#8216;university.edu.&#8217;}},</dd>
</dl>
</div></blockquote>
<dl class="last docutils">
<dt>&#8216;otherzone.university.edu&#8217;: {&#8216;any&#8217;: {&#8216;zone_type&#8217;: &#8216;slave&#8217;,</dt>
<dd>&#8216;zone_options&#8217;: &#8216;options&#8217;}}}</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</div></blockquote>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.MakeACL">
<tt class="descname">MakeACL</tt><big>(</big><em>acl_name</em>, <em>cidr_block</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.MakeACL" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes an acl from args.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>acl_name: string of acl name
cidr_block: string of valid CIDR block or IP address</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.MakeDnsServer">
<tt class="descname">MakeDnsServer</tt><big>(</big><em>dns_server_name</em>, <em>dns_server_ssh_username</em>, <em>dns_server_bind_dir</em>, <em>dns_server_test_dir</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.MakeDnsServer" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes one dns server</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd><p class="first">dns_server_name: string of the dns server name
dns_server_ssh_username: string of the ssh user on the server
dns_server_bind_dir: string of the absolute path to the bind directory</p>
<blockquote>
<div>example: u&#8217;/etc/bind/&#8217;</div></blockquote>
<p class="last">dns_server_test_dir: string of the absolute path to the test directory</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.MakeDnsServerSet">
<tt class="descname">MakeDnsServerSet</tt><big>(</big><em>dns_server_set_name</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.MakeDnsServerSet" title="Permalink to this definition">¶</a></dt>
<dd><p>Make dns server set.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>dns_server_set_name: string of dns server set name</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.MakeDnsServerSetAssignments">
<tt class="descname">MakeDnsServerSetAssignments</tt><big>(</big><em>dns_server_name</em>, <em>dns_server_set_name</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.MakeDnsServerSetAssignments" title="Permalink to this definition">¶</a></dt>
<dd><p>Make dns server set assignment.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>dns_server_name: string of dns server name
dns_server_set_name: string of dns server set name</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.MakeDnsServerSetViewAssignments">
<tt class="descname">MakeDnsServerSetViewAssignments</tt><big>(</big><em>view_name</em>, <em>view_order</em>, <em>dns_server_set_name</em>, <em>view_options=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.MakeDnsServerSetViewAssignments" title="Permalink to this definition">¶</a></dt>
<dd><p>Make dns server set view assignment</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd><p class="first">view_name: string of the view name
view_order: order that views should be added to named.conf
dns_server_set_name: string of the dns server set name
view_options: string of view options, defaults to empty string.</p>
<blockquote class="last">
<div><dl class="docutils">
<dt>for information on valid view options read:</dt>
<dd><a class="reference external" href="http://www.bind9.net/manual/bind/9.3.2/Bv9ARM.ch06.html#view_statement_grammar">http://www.bind9.net/manual/bind/9.3.2/Bv9ARM.ch06.html#view_statement_grammar</a></dd>
</dl>
</div></blockquote>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.MakeForwardZonePermission">
<tt class="descname">MakeForwardZonePermission</tt><big>(</big><em>zone_name</em>, <em>group_name</em>, <em>group_permission=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.MakeForwardZonePermission" title="Permalink to this definition">¶</a></dt>
<dd><p>Make forward zone permission.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_name: string of zone name
group_name: string of group name
group_permission: list group permissions, i.e., [&#8216;a&#8217;, &#8216;aaaa&#8217;, &#8216;cname&#8217;]</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.MakeGroup">
<tt class="descname">MakeGroup</tt><big>(</big><em>group_name</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.MakeGroup" title="Permalink to this definition">¶</a></dt>
<dd><p>Make group.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>group_name: string of group name</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.MakeInfiniteCredential">
<tt class="descname">MakeInfiniteCredential</tt><big>(</big><em>user_name</em>, <em>credential=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.MakeInfiniteCredential" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates an infinite credential.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>user_name: string of user to create credential for.</dd>
<dt>Outputs:</dt>
<dd>string: credential string created</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.MakeNamedConfGlobalOption">
<tt class="descname">MakeNamedConfGlobalOption</tt><big>(</big><em>dns_server_set</em>, <em>options</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.MakeNamedConfGlobalOption" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes named conf global option</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>dns_server_set: string of name of dns server set
options: string of named conf file</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.MakeRecord">
<tt class="descname">MakeRecord</tt><big>(</big><em>record_type</em>, <em>target</em>, <em>zone_name</em>, <em>record_args_dict</em>, <em>view_name=None</em>, <em>ttl=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.MakeRecord" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes a record.</p>
<p>Please check core_helpers for functions to make certain records that
need help before using this directly. For instance MakePTRRecord and
MakeAAAARecord.</p>
<dl class="docutils">
<dt>Raises:</dt>
<dd>InvalidInputError: &#8221;.&#8221; not allowed as terminator in non-ptr target.
InvalidInputError: An SOA cannot be made in the &#8220;any&#8221; view.
InvalidInputError: CNAME already exists.
InvalidInputError: Record already exists.
InvalidInputError: Duplicate record found.</dd>
<dt>Inputs:</dt>
<dd><p class="first">record_type: string of record type (example: u&#8217;mx&#8217;)
target: string of target (example u&#8217;machine-01&#8217;)
zone_name: string of zone name (example u&#8217;sub.university.edu&#8217;)
ttl: int of time to live per record
view_name: string of view name (example u&#8217;internal&#8217;)
record_args_dict: dictionary, which is different for each record type.</p>
<blockquote class="last">
<div><p>an example dictionary can be obtained with the
GetEmptyRecordArgsDict function in this class
(example: {u&#8217;priority&#8217;: 10,</p>
<blockquote>
<div>u&#8217;mail_server&#8217;: &#8216;mail.sub.university.edu.&#8217;})</div></blockquote>
</div></blockquote>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.MakeReservedWord">
<tt class="descname">MakeReservedWord</tt><big>(</big><em>reserved_word</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.MakeReservedWord" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a reserved word.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>reserved_word: string of reserved word</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.MakeReverseRangePermission">
<tt class="descname">MakeReverseRangePermission</tt><big>(</big><em>cidr_block</em>, <em>group_name</em>, <em>group_permission=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.MakeReverseRangePermission" title="Permalink to this definition">¶</a></dt>
<dd><p>Make reverse range permission.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>cidr_block: string of cidr block
group_name: string of group name
group_permission: list of group permissions, i.e., [&#8216;cname&#8217;, &#8216;ptr&#8217;]</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.MakeReverseRangeZoneAssignment">
<tt class="descname">MakeReverseRangeZoneAssignment</tt><big>(</big><em>zone_name</em>, <em>cidr_block</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.MakeReverseRangeZoneAssignment" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes a reverse range to zone assignment.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_name: string of zone name
cidr_block: string of cidr block</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.MakeUser">
<tt class="descname">MakeUser</tt><big>(</big><em>user_name</em>, <em>access_level</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.MakeUser" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a user.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>user_name: string of user name
access_level: int from 0-255 as defined in user.py</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.MakeUserGroupAssignment">
<tt class="descname">MakeUserGroupAssignment</tt><big>(</big><em>user_name</em>, <em>group_name</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.MakeUserGroupAssignment" title="Permalink to this definition">¶</a></dt>
<dd><p>Make user-group assignment.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>group_name: string of group name
user_name: string of user name</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.MakeView">
<tt class="descname">MakeView</tt><big>(</big><em>view_name</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.MakeView" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes a view and all of the other things that go with a view.</p>
<p>For more information about views please see docstring for
MakeViewAssignments.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>view_name: string of view name</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.MakeViewAssignment">
<tt class="descname">MakeViewAssignment</tt><big>(</big><em>view_superset</em>, <em>view_subset</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.MakeViewAssignment" title="Permalink to this definition">¶</a></dt>
<dd><p>Assigns a view to view.</p>
<p>A view contains zones in that view. However zones can be assigned
to another view that is a superset of views. For example
an assignment can be made for view_a(view_superset) to also include
all of view_b&#8217;s(view_subset) zones(and by proxy, records). This
prevents having to have duplicate records in each view.</p>
<p>Most of the time this will not be needed as there is a special
subset included in all views(unless explicitly deleted) called the
&#8216;any&#8217; view. Records in the &#8216;any&#8217; view will be in all views that
have not been explicity changed to remove the &#8216;any&#8217; view.</p>
<p>The &#8216;any&#8217; view subset is automatically tied to a view when a
view is created. Also this is the default view for records
and zones(again it can be explicitly changed if needed).</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>view_superset: string of view name
view_subset: string of view name</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.MakeViewToACLAssignments">
<tt class="descname">MakeViewToACLAssignments</tt><big>(</big><em>view_name</em>, <em>dns_server_set_name</em>, <em>acl_name</em>, <em>acl_range_allowed</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.MakeViewToACLAssignments" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes view to acl assignment</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>view_name: string of view name
dns_server_set_name: string of dns_server_set name
acl_name: string of acl name
acl_range_allowed: boolean to allow/disallow given acl range</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.MakeZone">
<tt class="descname">MakeZone</tt><big>(</big><em>zone_name</em>, <em>zone_type</em>, <em>zone_origin</em>, <em>view_name=None</em>, <em>zone_options=None</em>, <em>make_any=True</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.MakeZone" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes a zone.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd><p class="first">zone_name: string of zone name
zone_type: string of zone type
zone_origin: string of zone origin. ex dept.univiersity.edu.
zone_options: string of zone_options(defaults to empty string)</p>
<blockquote>
<div><dl class="docutils">
<dt>valid zone options can be found here:</dt>
<dd><a class="reference external" href="http://www.bind9.net/manual/bind/9.3.2/Bv9ARM.ch06.html#zone_statement_grammar">http://www.bind9.net/manual/bind/9.3.2/Bv9ARM.ch06.html#zone_statement_grammar</a></dd>
</dl>
</div></blockquote>
<dl class="docutils">
<dt>view_name: string of view name(defaults to &#8216;any&#8217;)</dt>
<dd>see docstring of MakeViewAssignments as to why &#8216;any&#8217; is default</dd>
</dl>
<p class="last">make_any: regardless of view name, make any as well(default to True)</p>
</dd>
<dt>Raises:</dt>
<dd>UnexpectedDataError: Invalid zone type.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.MakeZoneType">
<tt class="descname">MakeZoneType</tt><big>(</big><em>zone_type</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.MakeZoneType" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes a new zone type.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_type: string of zone type</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.RemoveACL">
<tt class="descname">RemoveACL</tt><big>(</big><em>acl_name</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.RemoveACL" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes an acl from args. Will also remove relevant acl-view assignments.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>acl_name: string of acl name</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.RemoveCIDRBlockFromACL">
<tt class="descname">RemoveCIDRBlockFromACL</tt><big>(</big><em>acl_name</em>, <em>cidr_block</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.RemoveCIDRBlockFromACL" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes CIDR Block from ACL</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>acl_name: string of acl name
cidr_block: string of valid CIDR block or IP address
range_allowed: Int bool of if range should be allowed or denied</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.RemoveCredential">
<tt class="descname">RemoveCredential</tt><big>(</big><em>credential=None</em>, <em>user_name=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.RemoveCredential" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes a credential</p>
<p>This function will call _RemoveCredential after Authorize and then log it.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>credential: string of credential to remove
user_name: string of user name who has a credential to remove</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.RemoveDnsServer">
<tt class="descname">RemoveDnsServer</tt><big>(</big><em>dns_server_name</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.RemoveDnsServer" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes dns server.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>dns_server_name: string of dns server name</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.RemoveDnsServerSet">
<tt class="descname">RemoveDnsServerSet</tt><big>(</big><em>dns_server_set_name</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.RemoveDnsServerSet" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove dns server set.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>dns_server_set_name: string of dns server set name</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.RemoveDnsServerSetAssignments">
<tt class="descname">RemoveDnsServerSetAssignments</tt><big>(</big><em>dns_server_name</em>, <em>dns_server_set_name</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.RemoveDnsServerSetAssignments" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove a dns server set assignment</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>dns_server_name: string of dns server name
dns_server_set_name: string of dns server set name</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.RemoveDnsServerSetViewAssignments">
<tt class="descname">RemoveDnsServerSetViewAssignments</tt><big>(</big><em>view_name</em>, <em>dns_server_set_name</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.RemoveDnsServerSetViewAssignments" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove dns server set view assignment</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>view_name: string of view name
dns_server_set_name: string of dns server set name</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.RemoveForwardZonePermission">
<tt class="descname">RemoveForwardZonePermission</tt><big>(</big><em>zone_name</em>, <em>group_name</em>, <em>group_permission</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.RemoveForwardZonePermission" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove forward zone permissions.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_name: string of zone name
group_name: string of group name
group_permission: list of group permissions, i.e., [&#8216;a&#8217;, &#8216;aaaa&#8217;, &#8216;cname&#8217;]</dd>
<dt>Outputs:</dt>
<dd>int: number of rows affected</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.RemoveGroup">
<tt class="descname">RemoveGroup</tt><big>(</big><em>group_name</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.RemoveGroup" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove group.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>group_name: string of group name</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.RemoveRecord">
<tt class="descname">RemoveRecord</tt><big>(</big><em>record_type</em>, <em>target</em>, <em>zone_name</em>, <em>record_args_dict</em>, <em>view_name</em>, <em>ttl=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.RemoveRecord" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove record.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>record_type: type of record
target: target name
zone_name: name of zone
record_args_dict: dictionary of record arguments
view_name: name of view
ttl: time to live</dd>
<dt>Raises:</dt>
<dd><dl class="first docutils">
<dt>InvalidInputError: No records found.</dt>
<dd>Multiple records found for used search terms.</dd>
</dl>
<p class="last">RecordError: Could not remove record for an unknown reason.</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.RemoveReservedWord">
<tt class="descname">RemoveReservedWord</tt><big>(</big><em>reserved_word</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.RemoveReservedWord" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes a reserved word.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>reserved_word: string of reserved word</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.RemoveReverseRangePermission">
<tt class="descname">RemoveReverseRangePermission</tt><big>(</big><em>cidr_block</em>, <em>group_name</em>, <em>group_permission</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.RemoveReverseRangePermission" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove reverse range permissions.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>cidr_block: string of cidr block
group_name: string of group name
group_permission: list of group permissions, i.e., [&#8216;a&#8217;, &#8216;aaaa&#8217;, &#8216;cname&#8217;]</dd>
<dt>Outputs:</dt>
<dd>int: number of rows affected</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.RemoveReverseRangeZoneAssignment">
<tt class="descname">RemoveReverseRangeZoneAssignment</tt><big>(</big><em>zone_name</em>, <em>cidr_block</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.RemoveReverseRangeZoneAssignment" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove reverse range to zone assignment.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_name: string of zone name
cidr_block: string of cidr block</dd>
<dt>Outputs:</dt>
<dd>int: number of rows affected</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.RemoveUser">
<tt class="descname">RemoveUser</tt><big>(</big><em>user_name</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.RemoveUser" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes a user.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>user_name: string of user name</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.RemoveUserGroupAssignment">
<tt class="descname">RemoveUserGroupAssignment</tt><big>(</big><em>user_name</em>, <em>group_name</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.RemoveUserGroupAssignment" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove user-group.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>group_name: string of group name
user_name: string of user name</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.RemoveView">
<tt class="descname">RemoveView</tt><big>(</big><em>view_name</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.RemoveView" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes a view.</p>
<p>Also removes anything attatched to that view. Including any information
about a specific zone in the view and any records in that view.
Please point gun away from foot.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>view_name: string of view name</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: Cannot remove view any</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.RemoveViewAssignment">
<tt class="descname">RemoveViewAssignment</tt><big>(</big><em>view_superset</em>, <em>view_subset</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.RemoveViewAssignment" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes a view assignment.</p>
<p>For more informaton about view assignments please read the
MakeViewAssignment docstring.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>view_superset: string of view name
view_subset: string of view name</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.RemoveViewToACLAssignments">
<tt class="descname">RemoveViewToACLAssignments</tt><big>(</big><em>view_name</em>, <em>dns_server_set_name</em>, <em>acl_name</em>, <em>acl_range_allowed</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.RemoveViewToACLAssignments" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes view to acl assignment</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>view_name: string of view name
dns_server_set_name: string of dns_server_set name
acl_name: string of acl name</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.RemoveZone">
<tt class="descname">RemoveZone</tt><big>(</big><em>zone_name</em>, <em>view_name=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.RemoveZone" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes a zone.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_name: string of zone name
view_name: string of view name</dd>
<dt>Outputs:</dt>
<dd>int: number of rows affected</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.RemoveZoneType">
<tt class="descname">RemoveZoneType</tt><big>(</big><em>zone_type</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.RemoveZoneType" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes a zone type.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_type: string of zone type</dd>
<dt>Outputs:</dt>
<dd>int: number of rows affected</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.SetMaintenanceFlag">
<tt class="descname">SetMaintenanceFlag</tt><big>(</big><em>value</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.SetMaintenanceFlag" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets maintenance flag</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>value: boolean of flag on or off</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.UpdateDnsServer">
<tt class="descname">UpdateDnsServer</tt><big>(</big><em>search_dns_server_name</em>, <em>update_dns_server_name</em>, <em>update_dns_server_ssh_username</em>, <em>update_dns_server_bind_dir</em>, <em>update_dns_server_test_dir</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.UpdateDnsServer" title="Permalink to this definition">¶</a></dt>
<dd><p>Updates dns server</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>search_dns_server_name: string of dns server name
update_dns_server_name: new string of dns server name
update_dns_server_ssh_username: new string of dns server username
update_dns_server_bind_dir: new string of path to the bind directory
update_dns_server_test_dir: new string of path to the test directory</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.UpdateDnsServerSet">
<tt class="descname">UpdateDnsServerSet</tt><big>(</big><em>search_dns_server_set_name</em>, <em>update_dns_server_set_name</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.UpdateDnsServerSet" title="Permalink to this definition">¶</a></dt>
<dd><p>Update dns_server_set.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>search_dns_server_set_name: string of dns_server_set name
update_dns_server_set_name: string of dns_server_set name</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.UpdateDnsServerSetViewAssignments">
<tt class="descname">UpdateDnsServerSetViewAssignments</tt><big>(</big><em>search_dns_server_set_name</em>, <em>search_view_name</em>, <em>update_view_order=None</em>, <em>update_view_options=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.UpdateDnsServerSetViewAssignments" title="Permalink to this definition">¶</a></dt>
<dd><p>Update dns_server_set&#8217;s view order and view options</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd><p class="first">search_view_name: string of view name
search_dns_server_set_name: string of dns_server_set name
update_view_order: int of new view order
update_view_options: string of view options,</p>
<blockquote class="last">
<div><dl class="docutils">
<dt>for information on valid view options read:</dt>
<dd><a class="reference external" href="http://www.bind9.net/manual/bind/9.3.2/Bv9ARM.ch06.html#view_statement_grammar">http://www.bind9.net/manual/bind/9.3.2/Bv9ARM.ch06.html#view_statement_grammar</a></dd>
</dl>
</div></blockquote>
</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.UpdateGroup">
<tt class="descname">UpdateGroup</tt><big>(</big><em>search_group_name</em>, <em>update_group_name</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.UpdateGroup" title="Permalink to this definition">¶</a></dt>
<dd><p>Update group.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>search_group_name: string of group name
update_group_name: string of group name</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.UpdateGroupForwardPermission">
<tt class="descname">UpdateGroupForwardPermission</tt><big>(</big><em>zone_name</em>, <em>group_name</em>, <em>new_permissions</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.UpdateGroupForwardPermission" title="Permalink to this definition">¶</a></dt>
<dd><p>Updates forward zone group permissions</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_name: string of zone name
group_name: string of group name
new_permissions: list of permissions. (ex [u&#8217;a&#8217;, u&#8217;aaaa&#8217;, u&#8217;cname&#8217;])</dd>
<dt>Raises:</dt>
<dd>AuthorizationError: Group does not have access to supplied zone</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.UpdateGroupReversePermission">
<tt class="descname">UpdateGroupReversePermission</tt><big>(</big><em>cidr_block</em>, <em>group_name</em>, <em>new_permissions</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.UpdateGroupReversePermission" title="Permalink to this definition">¶</a></dt>
<dd><p>Updates forward zone group permissions</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>cidr_block: string of cidr_block
group_name: string of group name
new_permissions: list of permissions. (ex [u&#8217;a&#8217;, u&#8217;aaaa&#8217;, u&#8217;cname&#8217;])</dd>
<dt>Raises:</dt>
<dd>AuthorizationError: Group does not have access to supplied cidr block</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.UpdateRecord">
<tt class="descname">UpdateRecord</tt><big>(</big><em>search_record_type</em>, <em>search_target</em>, <em>search_zone_name</em>, <em>search_record_args_dict</em>, <em>search_view_name=None</em>, <em>search_ttl=None</em>, <em>update_target=None</em>, <em>update_zone_name=None</em>, <em>update_record_args_dict={}</em>, <em>update_view_name=None</em>, <em>update_ttl=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.UpdateRecord" title="Permalink to this definition">¶</a></dt>
<dd><p>Update record.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>search_record_type: type of record
search_target: target
search_zone_name: name of zone
search_record_args_dict: dictionary of record arguments
search_view_name: name of view
search_ttl: time to live
update_target: target
update_zone_name: name of zone
update_record_args_dict: dictionary of record arguments
update_view_name: name of view
update_ttl: time to live</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: &#8221;.&#8221; not allowed as terminator in non-ptr target.
InvalidInputError: Record already exists.
InvalidInputError: CNAME already exists.
InvalidInputError: Duplicate record found.
InvalidInputError: No records found.
InvalidInputError: Multiple records found for used search terms.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.UpdateUser">
<tt class="descname">UpdateUser</tt><big>(</big><em>search_user_name</em>, <em>update_user_name=None</em>, <em>update_access_level=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.UpdateUser" title="Permalink to this definition">¶</a></dt>
<dd><p>Updates a user.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>search_user_name: string of user name
update_user_name: string of user name
update_access_level: int from 0-255 as defined in user.py</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.UpdateView">
<tt class="descname">UpdateView</tt><big>(</big><em>search_view_name</em>, <em>update_view_name=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.UpdateView" title="Permalink to this definition">¶</a></dt>
<dd><p>Updates a view.</p>
<p>Also updates anything attatched to that view. Including any information
about a specific zone in the view and any records in that view.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>search_view_name: string of view name to be updated
update_view_name: string of view name to update with</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: Cannot update view any.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.Core.UpdateZone">
<tt class="descname">UpdateZone</tt><big>(</big><em>search_zone_name</em>, <em>search_view_name=None</em>, <em>update_zone_name=None</em>, <em>update_zone_options=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Core.UpdateZone" title="Permalink to this definition">¶</a></dt>
<dd><p>Updates zone options or zone type of zone</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd><p class="first">search_zone_name: string of zone name
search_view_name: string of view name
update_zone_name: string of zone name
update_zone_options: string of zone options</p>
<blockquote class="last">
<div><dl class="docutils">
<dt>valid zone options can be found here:</dt>
<dd><a class="reference external" href="http://www.bind9.net/manual/bind/9.3.2/Bv9ARM.ch06.html#zone_statement_grammar">http://www.bind9.net/manual/bind/9.3.2/Bv9ARM.ch06.html#zone_statement_grammar</a></dd>
</dl>
</div></blockquote>
</dd>
<dt>Outputs:</dt>
<dd>int: number of rows affected</dd>
</dl>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="roster_core.__init__.CoreHelpers">
<em class="property">class </em><tt class="descclassname">roster_core.__init__.</tt><tt class="descname">CoreHelpers</tt><big>(</big><em>core_instance</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>Library of helper functions that extend the core functions.</p>
<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.AddFormattedRecords">
<tt class="descname">AddFormattedRecords</tt><big>(</big><em>zone_name</em>, <em>zone_file_string</em>, <em>view</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.AddFormattedRecords" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds records from a string of a partial zone file</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_name: string of zone name
zone_file_string: string of the file contents
view: string of view name</dd>
<dt>Outputs:</dt>
<dd>int: Amount of records added to db.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.CIDRExpand">
<tt class="descname">CIDRExpand</tt><big>(</big><em>cidr_block</em>, <em>begin=None</em>, <em>end=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.CIDRExpand" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.ConstructRecordArgsDictFromRecordID">
<tt class="descname">ConstructRecordArgsDictFromRecordID</tt><big>(</big><em>record_id</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.ConstructRecordArgsDictFromRecordID" title="Permalink to this definition">¶</a></dt>
<dd><p>Constructs the records_arg_dict from the Roster database given only 
the record id.</p>
<p>Inputs:
record_id: int of record id</p>
<p>Outputs:
record_args_dict: dictionary of arguments and their values</p>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.ExpandIPV6">
<tt class="descname">ExpandIPV6</tt><big>(</big><em>ip_address</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.ExpandIPV6" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.GetAssociatedCNAMEs">
<tt class="descname">GetAssociatedCNAMEs</tt><big>(</big><em>hostname</em>, <em>view_name</em>, <em>zone_name</em>, <em>recursive=False</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.GetAssociatedCNAMEs" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists cname&#8217;s by assignment hostname.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>hostname: string of hostname
view_name: string of view name
zone_name: string of zone name</dd>
<dt>Outputs:</dt>
<dd>list: list of found cname dictionaries</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.GetCIDRBlocksByView">
<tt class="descname">GetCIDRBlocksByView</tt><big>(</big><em>view</em>, <em>username</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.GetCIDRBlocksByView" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists CIDR blocks available to a username in a given view</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>view: string of view name
username: string of user name</dd>
<dt>Outputs:</dt>
<dd>list: list of cidr block strings</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.GetPTRTarget">
<tt class="descname">GetPTRTarget</tt><big>(</big><em>long_target</em>, <em>view_name=u'any'</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.GetPTRTarget" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the short PTR target given the long PTR target
Inputs:</p>
<blockquote>
<div>long_target: String of long PTR target
view_name: String of view name</div></blockquote>
<dl class="docutils">
<dt>Raises:</dt>
<dd>InvalidInputError: No suitable reverse range zone assignments found.</dd>
<dt>Outputs:</dt>
<dd>string: String of short PTR target</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.GetViewsByUser">
<tt class="descname">GetViewsByUser</tt><big>(</big><em>username</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.GetViewsByUser" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists view names available to given username</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>username: string of user name</dd>
<dt>Outputs:</dt>
<dd>list: list of view name strings</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.ListAccessLevels">
<tt class="descname">ListAccessLevels</tt><big>(</big><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.ListAccessLevels" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists access levels from constants for both integer and string keys</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd>dict: dictionary of access levels with both string and integer-string keys</dd>
<dt>Example:</dt>
<dd><dl class="first last docutils">
<dt>{&#8216;32&#8217;: 32, &#8216;64&#8217;: 64, &#8216;128&#8217;: 128, &#8216;user&#8217;: 32, &#8216;unlocked_user&#8217;: 64,</dt>
<dd>&#8216;dns_admin&#8217;: 128}</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.ListAvailableIpsInCIDR">
<tt class="descname">ListAvailableIpsInCIDR</tt><big>(</big><em>cidr_block</em>, <em>num_ips=1</em>, <em>view_name=None</em>, <em>zone_name=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.ListAvailableIpsInCIDR" title="Permalink to this definition">¶</a></dt>
<dd><p>Finds first available ips. Only lists as many IPs as are available.
Returns empty list if no IPs are available in given cidr block and a
truncated list if only a portion of IPs are available.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>cidr_block: string of ipv4 or ipv6 cidr block</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: IP is in a reserved IP space.
InvalidInputError: Not a valid cidr block</dd>
<dt>Outputs:</dt>
<dd>list: list of strings of ip addresses</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.ListGroupPermissions">
<tt class="descname">ListGroupPermissions</tt><big>(</big><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.ListGroupPermissions" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.ListLatestNamedConfig">
<tt class="descname">ListLatestNamedConfig</tt><big>(</big><em>dns_server_set</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.ListLatestNamedConfig" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists the latest named config string given dns server set</p>
<p>This function is duplicated in
roster-config-manager/roster_config_manager/tree_exporter.py</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>dns_server_set: string of dns server set name</dd>
<dt>Outputs:</dt>
<dd>dict: dictionary of latest named config</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.ListNamedConfGlobalOptionsClient">
<tt class="descname">ListNamedConfGlobalOptionsClient</tt><big>(</big><em>option_id=None</em>, <em>dns_server_set=None</em>, <em>timestamp=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.ListNamedConfGlobalOptionsClient" title="Permalink to this definition">¶</a></dt>
<dd><p>Converts XMLRPC datetime to datetime object and runs
ListNamedConfGlobalOptions</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>option_id: integer of the option id
dns_server_set: string of the dns server set name
timestamp: XMLRPC datetime timestamp</dd>
<dt>Outputs:</dt>
<dd>list: list of dictionarires from ListNamedConfGlobalOptions</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.ListRecordsByCIDRBlock">
<tt class="descname">ListRecordsByCIDRBlock</tt><big>(</big><em>cidr_block</em>, <em>view_name=None</em>, <em>zone_name=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.ListRecordsByCIDRBlock" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists records in a given cidr block.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>cidr_block: string of ipv4 or ipv6 cidr block
view_name: string of the view
zone_name: string of the zone</dd>
<dt>Raise:</dt>
<dd>InvalidInputError: The CIDR block specified does not contain a valid IP
IPIndexError: Record type not indexable by IP
IPIndexError: Record type unknown. Missing ipv4 or ipv6 dec index</dd>
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>dict: A dictionary Keyed by view, keyed by IP, listed by record.</dt>
<dd><dl class="first last docutils">
<dt>example:</dt>
<dd><dl class="first last docutils">
<dt>{u&#8217;test_view&#8217;:</dt>
<dd><dl class="first last docutils">
<dt>{u&#8216;192.168.1.8&#8217;:</dt>
<dd><dl class="first last docutils">
<dt>[{u&#8217;forward&#8217;: True,</dt>
<dd><blockquote class="first">
<div>u&#8217;host&#8217;: u&#8217;host6.university.edu&#8217;,
u&#8217;zone&#8217;: u&#8217;forward_zone&#8217;,
u&#8217;zone_origin&#8217;: u&#8217;university.edu.&#8217;},</div></blockquote>
<dl class="last docutils">
<dt>{u&#8217;forward&#8217;: False,</dt>
<dd>u&#8217;host&#8217;: u&#8217;host6.university.edu&#8217;,
u&#8217;zone&#8217;: u&#8217;reverse_zone&#8217;,
u&#8217;zone_origin&#8217;: u&#8216;1.168.192.in-addr.arpa.&#8217;}]}}</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.ListRecordsByZone">
<tt class="descname">ListRecordsByZone</tt><big>(</big><em>zone_name</em>, <em>view_name=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.ListRecordsByZone" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists records in a given zone.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_name: name of the zone
view_name: name of the view</dd>
<dt>Output:</dt>
<dd><dl class="first last docutils">
<dt>dict: A dictionary Keyed by view, keyed by IP, listed by record.</dt>
<dd><dl class="first last docutils">
<dt>example:</dt>
<dd><dl class="first last docutils">
<dt>{u&#8217;test_view&#8217;:</dt>
<dd><dl class="first last docutils">
<dt>{u&#8216;192.168.1.8&#8217;:</dt>
<dd><dl class="first last docutils">
<dt>[{u&#8217;forward&#8217;: True,</dt>
<dd><blockquote class="first">
<div>u&#8217;host&#8217;: u&#8217;host6.university.edu&#8217;,
u&#8217;zone&#8217;: u&#8217;forward_zone&#8217;,
u&#8217;zone_origin&#8217;: u&#8217;university.edu.&#8217;},</div></blockquote>
<dl class="last docutils">
<dt>{u&#8217;forward&#8217;: False,</dt>
<dd>u&#8217;host&#8217;: u&#8217;host6.university.edu&#8217;,
u&#8217;zone&#8217;: u&#8217;reverse_zone&#8217;,
u&#8217;zone_origin&#8217;: u&#8216;1.168.192.in-addr.arpa.&#8217;}]}}</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.ListSortedHostsByCIDR">
<tt class="descname">ListSortedHostsByCIDR</tt><big>(</big><em>cidr</em>, <em>zone_name=None</em>, <em>view_name=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.ListSortedHostsByCIDR" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.ListSortedHostsByZone">
<tt class="descname">ListSortedHostsByZone</tt><big>(</big><em>zone_name</em>, <em>view_name=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.ListSortedHostsByZone" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.ListZoneByIPAddress">
<tt class="descname">ListZoneByIPAddress</tt><big>(</big><em>ip_address</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.ListZoneByIPAddress" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists zone name given ip_address</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>ip_address: string of ip address</dd>
<dt>Outputs:</dt>
<dd>string: string of zone name, ex: &#8216;test_zone&#8217;</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.MakeAAAARecord">
<tt class="descname">MakeAAAARecord</tt><big>(</big><em>target</em>, <em>zone_name</em>, <em>record_args_dict</em>, <em>view_name=None</em>, <em>ttl=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.MakeAAAARecord" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes an AAAA record.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>target: string of target
zone_name: string of zone name
record_args_dict: dictionary of record arguments
view_name: string of view name
ttl: time to live</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.MakeIPv4ClasslessReverseDelegatedTargetZone">
<tt class="descname">MakeIPv4ClasslessReverseDelegatedTargetZone</tt><big>(</big><em>cidr_block</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.MakeIPv4ClasslessReverseDelegatedTargetZone" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a delegated reverse zone</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>cidr_block: string of IPv4 cidr block</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: Not a valid cidr block</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.MakeIPv4ClasslessReverseDelegation">
<tt class="descname">MakeIPv4ClasslessReverseDelegation</tt><big>(</big><em>name_server</em>, <em>cidr_block</em>, <em>view_name=u'any'</em>, <em>ttl=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.MakeIPv4ClasslessReverseDelegation" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates classless forwarding for reverse DNS lookups</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>name_server: nameserver to add for reverse delegation
cidr_block: string of CIDR block
view_name: string of view for the reverse zone, defaults to &#8216;any&#8217;
ttl: time-to-live for the newly added records, defaults to zone ttl</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: nameserver required
InvalidInputError: cidr block range required
InvalidInputError: Not a valid zone name or CIDR block</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.MakePTRRecord">
<tt class="descname">MakePTRRecord</tt><big>(</big><em>target</em>, <em>record_args_dict</em>, <em>view_name=u'any'</em>, <em>ttl=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.MakePTRRecord" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes a ptr record.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>target: string of target
record_args_dict: dictionary of record arguments
view_name: string of view name
ttl: string of ttl</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.MakeSubdomainDelegation">
<tt class="descname">MakeSubdomainDelegation</tt><big>(</big><em>zone_name</em>, <em>subdomain_name</em>, <em>nameserver</em>, <em>view_name=u'any'</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.MakeSubdomainDelegation" title="Permalink to this definition">¶</a></dt>
<dd><p>&#8220;Makes a Delegated Subdomain
Assumes delegation zone is created</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>view_name: string of view name
zone_name: string of zone name
subdomain_name: string of subdomain name 
nameserver: string of fully qualified nameserver</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: Zone does not exist.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.ProcessRecordsBatch">
<tt class="descname">ProcessRecordsBatch</tt><big>(</big><em>delete_records=None</em>, <em>add_records=None</em>, <em>zone_import=False</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.ProcessRecordsBatch" title="Permalink to this definition">¶</a></dt>
<dd><p>Proccess batches of records</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd><dl class="first docutils">
<dt>delete_records: list of dictionaries of records</dt>
<dd><dl class="first last docutils">
<dt>ex: {&#8216;record_ttl&#8217;: 3600, &#8216;record_type&#8217;: u&#8217;a&#8217;,</dt>
<dd>&#8216;records_id&#8217;: 10, &#8216;record_target&#8217;: u&#8217;host1&#8217;,
&#8216;record_zone_name&#8217;: u&#8217;forward_zone&#8217;,
&#8216;record_last_user&#8217;: u&#8217;sharrell&#8217;,
&#8216;record_view_dependency&#8217;: u&#8217;test_view_dep&#8217;}
{&#8216;record_type&#8217;: &#8216;ptr&#8217;, &#8216;record_target&#8217;: &#8216;target&#8217;,
&#8216;view_name&#8217;: &#8216;view&#8217;, &#8216;zone_name&#8217;: &#8216;zone&#8217;}</dd>
</dl>
</dd>
</dl>
<p class="last">add_records: list of dictionaries of records</p>
</dd>
<dt>Raises: </dt>
<dd>RecordsBatchError: Record specification too broad
RecordsBatchError: No record found
RecordsBatchError: Record already exists
RecordsBatchError: CNAME already exists
RecordsBatchError: Duplicate record found</dd>
<dt>Outputs:</dt>
<dd>int: row count</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.RemoveCNamesByAssignmentHost">
<tt class="descname">RemoveCNamesByAssignmentHost</tt><big>(</big><em>hostname</em>, <em>view_name</em>, <em>zone_name</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.RemoveCNamesByAssignmentHost" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes cname&#8217;s by assignment hostname, will not remove cnames
that the user does not have permissin to remove. The function will continue
and pass over that cname.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>hostname: string of hostname
view_name: string of view name
zone_name: string of zone name</dd>
<dt>Raises:</dt>
<dd>UnexpectedDataError: Incorrect number of records found</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.RemovePTRRecord">
<tt class="descname">RemovePTRRecord</tt><big>(</big><em>record_type</em>, <em>target</em>, <em>zone_name</em>, <em>record_args_dict</em>, <em>view_name</em>, <em>ttl=None</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.RemovePTRRecord" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes a ptr record.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>target: string of target
record_args_dict: dictionary of record arguments
view_name: string of view name
ttl: string of ttl</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.ReverseIP">
<tt class="descname">ReverseIP</tt><big>(</big><em>ip_address</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.ReverseIP" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.RevertNamedConfig">
<tt class="descname">RevertNamedConfig</tt><big>(</big><em>dns_server_set</em>, <em>option_id</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.RevertNamedConfig" title="Permalink to this definition">¶</a></dt>
<dd><p>Revert a Named Config file</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>option_id: the id of config to replicate
dns_server_set: string of dns server set name</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: DNS server set does not contain id.
UnexpectedDataError: Multiple configurations found.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.SortRecordsByHost">
<tt class="descname">SortRecordsByHost</tt><big>(</big><em>records_dict</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.SortRecordsByHost" title="Permalink to this definition">¶</a></dt>
<dd><p>Generates an IP list sorted by record&#8217;s host
Inputs:</p>
<blockquote>
<div><dl class="docutils">
<dt>record_dict: dictionary keyed by view, then keyed by IP</dt>
<dd>dictionary from ListRecordsByCIDRBlock
and from ListRecordsByZone</dd>
</dl>
</div></blockquote>
<dl class="docutils">
<dt>Outputs:</dt>
<dd>sorted_list: list of sorted records</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.__init__.CoreHelpers.UnReverseIP">
<tt class="descname">UnReverseIP</tt><big>(</big><em>ip_address</em><big>)</big><a class="headerlink" href="#roster_core.__init__.CoreHelpers.UnReverseIP" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="roster_core.__init__.Config">
<em class="property">class </em><tt class="descclassname">roster_core.__init__.</tt><tt class="descname">Config</tt><big>(</big><em>file_name='/etc/roster/roster_server.conf'</em><big>)</big><a class="headerlink" href="#roster_core.__init__.Config" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>Abstracts a config file for Roster Core and Server</p>
<dl class="method">
<dt id="roster_core.__init__.Config.GetDb">
<tt class="descname">GetDb</tt><big>(</big><big>)</big><a class="headerlink" href="#roster_core.__init__.Config.GetDb" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a dbAccess instance.</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd>dbAccess instance</dd>
</dl>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-roster_core.audit_log">
<span id="audit-log-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">audit_log</span></tt> Module<a class="headerlink" href="#module-roster_core.audit_log" title="Permalink to this headline">¶</a></h2>
<p>This module is used to create an audit log of activities executed on the
dnsManagement core and user libs.</p>
<dl class="class">
<dt id="roster_core.audit_log.AuditLog">
<em class="property">class </em><tt class="descclassname">roster_core.audit_log.</tt><tt class="descname">AuditLog</tt><big>(</big><em>log_to_syslog=False</em>, <em>log_to_db=False</em>, <em>db_instance=None</em>, <em>log_to_file=False</em>, <em>log_file_name=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/audit_log.html#AuditLog"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.audit_log.AuditLog" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<dl class="method">
<dt id="roster_core.audit_log.AuditLog.LogAction">
<tt class="descname">LogAction</tt><big>(</big><em>user</em>, <em>action</em>, <em>data</em>, <em>success</em>, <em>current_transaction=False</em><big>)</big><a class="reference internal" href="_modules/roster_core/audit_log.html#AuditLog.LogAction"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.audit_log.AuditLog.LogAction" title="Permalink to this definition">¶</a></dt>
<dd><p>Logs action to places specified in initalizer.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd><p class="first">user: string of user name
action: string of function name that is being logged
data: dictionary of arguments</p>
<blockquote>
<div><dl class="docutils">
<dt>ex: {&#8216;replay_args&#8217;: [u&#8217;test_acl&#8217;, u&#8216;192.168.0/24&#8217;, 1],</dt>
<dd><dl class="first last docutils">
<dt>&#8216;audit_args&#8217;: {&#8216;cidr_block&#8217;: u&#8216;192.168.0/24&#8217;,</dt>
<dd>&#8216;range_allowed&#8217;: 1,
&#8216;acl_name&#8217;: u&#8217;test_acl&#8217;}}</dd>
</dl>
</dd>
</dl>
</div></blockquote>
<p class="last">success: bool of success of action
current_transaction: boolean for if a transaction is already started</p>
</dd>
</dl>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-roster_core.config">
<span id="config-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">config</span></tt> Module<a class="headerlink" href="#module-roster_core.config" title="Permalink to this headline">¶</a></h2>
<p>Module to handle config file loading.</p>
<dl class="class">
<dt id="roster_core.config.Config">
<em class="property">class </em><tt class="descclassname">roster_core.config.</tt><tt class="descname">Config</tt><big>(</big><em>file_name='/etc/roster/roster_server.conf'</em><big>)</big><a class="reference internal" href="_modules/roster_core/config.html#Config"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.config.Config" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>Abstracts a config file for Roster Core and Server</p>
<dl class="method">
<dt id="roster_core.config.Config.GetDb">
<tt class="descname">GetDb</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/roster_core/config.html#Config.GetDb"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.config.Config.GetDb" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a dbAccess instance.</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd>dbAccess instance</dd>
</dl>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-roster_core.constants">
<span id="constants-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">constants</span></tt> Module<a class="headerlink" href="#module-roster_core.constants" title="Permalink to this headline">¶</a></h2>
<p>Module to handle all constants.</p>
</div>
<div class="section" id="module-roster_core.core">
<span id="core-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">core</span></tt> Module<a class="headerlink" href="#module-roster_core.core" title="Permalink to this headline">¶</a></h2>
<p>Toplevel core API.</p>
<dl class="function">
<dt id="roster_core.core.CheckCoreVersionMatches">
<tt class="descclassname">roster_core.core.</tt><tt class="descname">CheckCoreVersionMatches</tt><big>(</big><em>version</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#CheckCoreVersionMatches"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.CheckCoreVersionMatches" title="Permalink to this definition">¶</a></dt>
<dd><p>Does a version check between core and calling module</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>version: version to check against core&#8217;s version</dd>
<dt>Raises:</dt>
<dd>VersionDiscrepancyError: version mismatch with core version.</dd>
</dl>
</dd></dl>

<dl class="class">
<dt id="roster_core.core.Core">
<em class="property">class </em><tt class="descclassname">roster_core.core.</tt><tt class="descname">Core</tt><big>(</big><em>user_name</em>, <em>config_instance</em>, <em>unittest_timestamp=None</em>, <em>parent_server_instance=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>Backend Roster interface.</p>
<p>This class is meant to be the only interface to the database for top
level programming for a web or xml-rpc interface, or anything else
that would need to talk to the database.</p>
<p>All errors raised will be a subclass of CoreError.</p>
<dl class="method">
<dt id="roster_core.core.Core.BootstrapZone">
<tt class="descname">BootstrapZone</tt><big>(</big><em>zone_name</em>, <em>zone_type</em>, <em>zone_origin</em>, <em>view_name</em>, <em>zone_bootstrap_dict</em>, <em>zone_options=None</em>, <em>make_any=True</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.BootstrapZone"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.BootstrapZone" title="Permalink to this definition">¶</a></dt>
<dd><p>Generates SOA and NS records for a zone.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd><blockquote class="first">
<div><dl class="docutils">
<dt>zone_bootstrap_dict: dictionary containing between 0 and 2 keys </dt>
<dd>&#8216;admin_email&#8217; and &#8216;name_server&#8217; if either 
of those keys are omitted, then their corresponding
values are &#8216;generated&#8217; by this method.</dd>
</dl>
</div></blockquote>
<p>zone_name: string of zone name
zone_type: string of zone type
zone_origin: string of zone origin. ex dept.univiersity.edu.
zone_options: string of zone_options(defaults to empty string)</p>
<blockquote>
<div><dl class="docutils">
<dt>valid zone options can be found here:</dt>
<dd><a class="reference external" href="http://www.bind9.net/manual/bind/9.3.2/Bv9ARM.ch06.html#zone_statement_grammar">http://www.bind9.net/manual/bind/9.3.2/Bv9ARM.ch06.html#zone_statement_grammar</a></dd>
</dl>
</div></blockquote>
<dl class="docutils">
<dt>view_name: string of view name(defaults to &#8216;any&#8217;)</dt>
<dd>see docstring of MakeViewAssignments as to why &#8216;any&#8217; is default</dd>
</dl>
<p class="last">make_any: regardless of view name, make any as well(default to True)</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.CheckMaintenanceFlag">
<tt class="descname">CheckMaintenanceFlag</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.CheckMaintenanceFlag"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.CheckMaintenanceFlag" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks maintenance flag</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd>bool: value of flag on or off</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.GetEmptyRecordArgsDict">
<tt class="descname">GetEmptyRecordArgsDict</tt><big>(</big><em>record_type</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.GetEmptyRecordArgsDict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.GetEmptyRecordArgsDict" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets record args dict for the record_type.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>record_type: string of record type (example: u&#8217;mx&#8217;)</dd>
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>dictionary: which is different for each record type.</dt>
<dd><dl class="first last docutils">
<dt>(example: {u&#8217;priority&#8217;: 10,</dt>
<dd>u&#8217;mail_server&#8217;: &#8216;mail.sub.university.edu.&#8217;})</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.ListACLs">
<tt class="descname">ListACLs</tt><big>(</big><em>acl_name=None</em>, <em>cidr_block=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.ListACLs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.ListACLs" title="Permalink to this definition">¶</a></dt>
<dd><p>List one or many acls, if all args are none it will them all, or just
search on one more terms.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>acl_name: string of acl name
cidr_block: string of valid CIDR block or IP address</dd>
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>dictionary: keyed by the acl name whos value is a list dictionaries with</dt>
<dd><blockquote class="first">
<div>the cidr block and range allowed values.</div></blockquote>
<dl class="last docutils">
<dt>example: {&#8216;rfc_1918_networks&#8217;:   [{&#8216;cidr_block&#8217;: &#8216;192.168/16&#8217;},</dt>
<dd><blockquote class="first">
<div>{&#8216;cidr_block&#8217;: &#8216;10/8&#8217;}],</div></blockquote>
<dl class="last docutils">
<dt>&#8216;university_networks&#8217;: [{&#8216;cidr_block&#8217;: &#8216;1.2.3/24&#8217;},</dt>
<dd>{&#8216;cidr_block&#8217;: &#8216;1.1.1/24&#8217;}]}</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.ListAuditLog">
<tt class="descname">ListAuditLog</tt><big>(</big><em>user_name=None</em>, <em>action=None</em>, <em>success=None</em>, <em>begin_timestamp=None</em>, <em>end_timestamp=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.ListAuditLog"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.ListAuditLog" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists audit log</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>user_name: string of user name
action: string of function
success: intbool of success
begin_timestamp: datetime object of beginning timestamp
end_timestamp: datetime object of ending timestamp</dd>
<dt>Raises:</dt>
<dd>UnexpectedDataError: Missing begin_timestamp or end_timestamp.</dd>
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>dict: Dictionary of audit log</dt>
<dd><dl class="first last docutils">
<dt>ex: {&#8216;action&#8217;: u&#8217;Action&#8217;, &#8216;data&#8217;, u&#8217;Data&#8217;,</dt>
<dd>&#8216;audit_log_timestamp&#8217;: datetime.datetime,
&#8216;audit_log_user_name&#8217;: u&#8217;username&#8217;}</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.ListCredentials">
<tt class="descname">ListCredentials</tt><big>(</big><em>credential=None</em>, <em>user_name=None</em>, <em>infinite_cred=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.ListCredentials"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.ListCredentials" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists infinte credentials.</p>
<p>This function basically just calls _ListCredentials but runs Authorize
before.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>credential: string of specific credential that is being searched for
user_name: string of name of user that is being searched for
infinite_cred: bool of search for infinite or non infinite creds</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.ListDnsServerSetAssignments">
<tt class="descname">ListDnsServerSetAssignments</tt><big>(</big><em>dns_server_name=None</em>, <em>dns_server_set_name=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.ListDnsServerSetAssignments"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.ListDnsServerSetAssignments" title="Permalink to this definition">¶</a></dt>
<dd><p>List dns server set assignments.
Inputs:</p>
<blockquote>
<div>dns_server_name: string of dns server name
dns_server_set_name: string of dns server set name</div></blockquote>
<dl class="docutils">
<dt>Outputs:</dt>
<dd>dictionary keyed by server sets.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.ListDnsServerSetViewAssignments">
<tt class="descname">ListDnsServerSetViewAssignments</tt><big>(</big><em>view_name=None</em>, <em>dns_server_set_name=None</em>, <em>key_by_view=False</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.ListDnsServerSetViewAssignments"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.ListDnsServerSetViewAssignments" title="Permalink to this definition">¶</a></dt>
<dd><p>List dns server set view assignments</p>
<p>Assignments can be given as a dictionary of dns server names with lists of
view names or as a dictionary of view names with lists of dns server names.</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd><p class="first">Dictionary keyed by view name or dns server set name with values of
lists of tuples of view_name or dns_server_sets with view_order and 
view options as the second and third members of the tuple.</p>
<blockquote class="last">
<div><dl class="docutils">
<dt>example keyed by view_name:</dt>
<dd><dl class="first last docutils">
<dt>{&#8216;view1&#8217;: [(&#8216;set1&#8217;, 1, u&#8217;some_view_option;&#8217;), </dt>
<dd><blockquote class="first">
<div>(&#8216;set2&#8217;, 2, u&#8217;&#8216;)],</div></blockquote>
<p class="last">&#8216;view2&#8217;: [(&#8216;set2&#8217;, 2, u&#8217;&#8216;)]}</p>
</dd>
</dl>
</dd>
<dt>example keyed by dns_server_set_name:</dt>
<dd><dl class="first last docutils">
<dt>{&#8216;set1&#8217;: [(&#8216;view1&#8217;, 1, u&#8217;some_view_option;&#8217;)]</dt>
<dd><dl class="first last docutils">
<dt>&#8216;set2&#8217;: [(&#8216;view1&#8217;, 1, u&#8217;&#8216;), </dt>
<dd>(&#8216;view2&#8217;, 1, u&#8217;&#8216;)]}</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</div></blockquote>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.ListDnsServerSets">
<tt class="descname">ListDnsServerSets</tt><big>(</big><em>dns_server_set_name=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.ListDnsServerSets"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.ListDnsServerSets" title="Permalink to this definition">¶</a></dt>
<dd><p>List all dns server sets</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>dns_server_set_name: string of dns server set name</dd>
<dt>Outputs:</dt>
<dd>list of dns server sets</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.ListDnsServers">
<tt class="descname">ListDnsServers</tt><big>(</big><em>dns_server_name=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.ListDnsServers"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.ListDnsServers" title="Permalink to this definition">¶</a></dt>
<dd><p>List dns servers.</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>dictionary: dictionary of server metadata keyed by server the name.</dt>
<dd><dl class="first last docutils">
<dt>example:</dt>
<dd><dl class="first last docutils">
<dt>{u&#8217;dns1&#8217;: {</dt>
<dd>&#8216;ssh_username&#8217;: u&#8217;user&#8217;,
&#8216;bind_dir&#8217;: u&#8217;/etc/bind/&#8217;,
&#8216;test_dir&#8217;: u&#8217;/etc/bind/test&#8217;}}</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.ListForwardZonePermissions">
<tt class="descname">ListForwardZonePermissions</tt><big>(</big><em>zone_name=None</em>, <em>group_name=None</em>, <em>group_permission=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.ListForwardZonePermissions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.ListForwardZonePermissions" title="Permalink to this definition">¶</a></dt>
<dd><p>List forward zone permissions.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_name: string of zone name
group_name: string of group name
group_permission: list group permissions, i.e., [&#8216;a&#8217;, &#8216;aaaa&#8217;, &#8216;cname&#8217;]</dd>
<dt>Outputs:</dt>
<dd><p class="first">dictionary keyed by group name with values of lists of dictionaries
containing zone names and group permissions</p>
<blockquote class="last">
<div><dl class="docutils">
<dt>example: {&#8216;dept&#8217;: [{&#8216;zone_name&#8217;: &#8216;sub.univeristy.edu&#8217;,</dt>
<dd><blockquote class="first">
<div><blockquote>
<div>&#8216;group_permission&#8217;: [&#8216;a&#8217;, &#8216;aaaa&#8217;, &#8216;cname&#8217;]},</div></blockquote>
<dl class="docutils">
<dt>{&#8216;zone_name&#8217;: &#8216;othersub.university.edu&#8217;,</dt>
<dd>&#8216;group_permission&#8217;: [&#8216;a&#8217;, &#8216;aaaa&#8217;, &#8216;cname&#8217;, &#8216;soa&#8217;]}],</dd>
</dl>
</div></blockquote>
<dl class="last docutils">
<dt>&#8216;otherdept&#8217;: [{&#8216;zone_name&#8217;: &#8216;sub.university.edu&#8217;,</dt>
<dd>&#8216;group_permission&#8217;: [&#8216;a&#8217;, &#8216;aaaa&#8217;]}]}</dd>
</dl>
</dd>
</dl>
</div></blockquote>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.ListGroups">
<tt class="descname">ListGroups</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.ListGroups"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.ListGroups" title="Permalink to this definition">¶</a></dt>
<dd><p>List all groups.</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>list of groups</dt>
<dd>example [&#8216;cs&#8217;, &#8216;bio&#8217;]</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.ListNamedConfGlobalOptions">
<tt class="descname">ListNamedConfGlobalOptions</tt><big>(</big><em>option_id=None</em>, <em>dns_server_set=None</em>, <em>timestamp=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.ListNamedConfGlobalOptions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.ListNamedConfGlobalOptions" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists named conf global options</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>option_id: integer of named conf global option id
dns_server_set: string of the dns server set name
timestamp: datetime object of timestamp to search</dd>
<dt>Outputs:</dt>
<dd>named_conf_list: list of named conf global options</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.ListRecordArgumentDefinitions">
<tt class="descname">ListRecordArgumentDefinitions</tt><big>(</big><em>record_type=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.ListRecordArgumentDefinitions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.ListRecordArgumentDefinitions" title="Permalink to this definition">¶</a></dt>
<dd><p>List record argument definitions. This is mainly for the exporter to
programtically construct records for exporting.</p>
<p>This function is duplicated in
roster-config-manager/roster_config_manager/tree_exporter.py</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>record_type: string of record type</dd>
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>dictionary keyed by record type with values of lists</dt>
<dd><p class="first">of lists of record arguments sorted by argument order.
example: {&#8216;mx&#8217;: [{&#8216;argument_name&#8217;: u&#8217;priority&#8217;,</p>
<blockquote class="last">
<div><blockquote>
<div>&#8216;record_arguments_type&#8217;: u&#8217;mx&#8217;,
&#8216;argument_data_type&#8217;: u&#8217;UnsignedInt&#8217;,
&#8216;argument_order&#8217;: 0},</div></blockquote>
<p>{&#8216;argument_name&#8217;: u&#8217;mail_server&#8217;,
&#8216;record_arguments_type&#8217;: u&#8217;mx&#8217;,
&#8216;argument_data_type&#8217;: u&#8217;Hostname&#8217;,
&#8216;argument_order&#8217;: 1}]}</p>
</div></blockquote>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.ListRecords">
<tt class="descname">ListRecords</tt><big>(</big><em>record_type=None</em>, <em>target=None</em>, <em>zone_name=None</em>, <em>view_name=None</em>, <em>ttl=None</em>, <em>record_args_dict=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.ListRecords"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.ListRecords" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists records.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd><p class="first">record_type: string of record type (example: u&#8217;mx&#8217;)
target: string of target (example u&#8217;machine-01.sub.univeristy.edu.&#8217;)
zone_name: string of zone name (example u&#8217;sub.university.edu&#8217;)
ttl: int of time to live per record
view_name: string of view name (example u&#8217;internal&#8217;)
record_args_dict: dictionary, which is different for each record type.</p>
<blockquote class="last">
<div><p>an example dictionary can be obtained with the
GetEmptyRecordArgsDict function in this class
(example: {u&#8217;priority&#8217;: 10,</p>
<blockquote>
<div>u&#8217;mail_server&#8217;: &#8216;mail.sub.university.edu.&#8217;})</div></blockquote>
</div></blockquote>
</dd>
<dt>Raises:</dt>
<dd>UnexpectedDataError: Must specify record_type with record_args_dict.</dd>
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>list of record dictionaries</dt>
<dd><p class="first">Each dictionary can have different args depending on record type.
All of them will include record_type, target, zone_name, ttl, and
view_name regardless of record type. Below is an example of an mx
record search.
example: [{&#8216;record_type&#8217;: &#8216;mx&#8217;, &#8216;target&#8217;: &#8216;university.edu.&#8217;,</p>
<blockquote class="last">
<div><blockquote>
<div>&#8216;zone_name&#8217;: &#8216;university.edu&#8217;, ttl: 3600,
&#8216;view_name&#8217;: &#8216;external&#8217;, &#8216;priority&#8217;: 10,
&#8216;mail_server&#8217;: &#8216;smtp-01.university.edu.&#8217;,
&#8216;last_user&#8217;: &#8216;sharrell},</div></blockquote>
<dl class="docutils">
<dt>{&#8216;record_type&#8217;: &#8216;mx&#8217;, &#8216;target&#8217;: &#8216;university.edu.&#8217;,</dt>
<dd>&#8216;zone_name&#8217;: &#8216;university.edu&#8217;, ttl: 3600,
&#8216;view_name&#8217;: &#8216;external&#8217;, &#8216;priority&#8217;: 20,
&#8216;mail_server&#8217;: &#8216;smtp-02.university.edu.&#8217;},
&#8216;last_user&#8217;: &#8216;sharrell}]</dd>
</dl>
</div></blockquote>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.ListReservedWords">
<tt class="descname">ListReservedWords</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.ListReservedWords"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.ListReservedWords" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists reserved words.</p>
<dl class="docutils">
<dt>Output:</dt>
<dd><dl class="first last docutils">
<dt>list: list of reserved words</dt>
<dd>ex: [&#8216;reservedword1&#8217;, &#8216;reservedword2&#8217;]</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.ListReverseRangePermissions">
<tt class="descname">ListReverseRangePermissions</tt><big>(</big><em>cidr_block=None</em>, <em>group_name=None</em>, <em>group_permission=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.ListReverseRangePermissions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.ListReverseRangePermissions" title="Permalink to this definition">¶</a></dt>
<dd><p>List reverse range permissions.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>cidr_block: string of cidr block
group_name: string of group name
group_permission: list group permissions, i.e., [&#8216;a&#8217;, &#8216;aaaa&#8217;, &#8216;cname&#8217;]</dd>
<dt>Outputs:</dt>
<dd><p class="first">dictionary keyed by group name with values of lists of dictionaries
containing reverse ranges and group permissions</p>
<blockquote class="last">
<div><dl class="docutils">
<dt>example: {&#8216;dept&#8217;: [{&#8216;cidr_block&#8217;: &#8216;192.168.0/24&#8217;,</dt>
<dd><blockquote class="first">
<div><blockquote>
<div>&#8216;group_permission&#8217;: [u&#8217;cname&#8217;, u&#8217;ptr&#8217;]},</div></blockquote>
<dl class="docutils">
<dt>{&#8216;cidr_block&#8217;: &#8216;192.168.1/24&#8217;,</dt>
<dd>&#8216;group_permission&#8217;: [u&#8217;ptr&#8217;]}],</dd>
</dl>
</div></blockquote>
<dl class="last docutils">
<dt>&#8216;otherdept&#8217;: [{&#8216;cidr_block&#8217;: &#8216;192.168.1/24&#8217;,</dt>
<dd><dl class="first last docutils">
<dt>&#8216;group_permission&#8217;: [u&#8217;cname&#8217;, u&#8217;ns&#8217;, u&#8217;ptr&#8217;,</dt>
<dd>u&#8217;soa&#8217;]}]}</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</div></blockquote>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.ListReverseRangeZoneAssignments">
<tt class="descname">ListReverseRangeZoneAssignments</tt><big>(</big><em>zone_name=None</em>, <em>cidr_block=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.ListReverseRangeZoneAssignments"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.ListReverseRangeZoneAssignments" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists reverse range to zone assignments.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_name: string of zone name
cidr_block: string of cidr block</dd>
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>dictionary: keyed by zone_name with values of cidr blocks</dt>
<dd><dl class="first last docutils">
<dt>example: {&#8216;10.in-addr.arpa&#8217;: &#8216;10/8&#8217;,</dt>
<dd>&#8216;9.168.192.in-addr.arpa&#8217;: &#8216;192.168.9/24&#8217;}</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.ListUserGroupAssignments">
<tt class="descname">ListUserGroupAssignments</tt><big>(</big><em>user_name=None</em>, <em>group_name=None</em>, <em>key_by_group=False</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.ListUserGroupAssignments"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.ListUserGroupAssignments" title="Permalink to this definition">¶</a></dt>
<dd><p>List user-group assignments.</p>
<p>Assignments can be given as a dictionary of users with lists of groups or
as a dictionary of groups as a list of users.</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd><p class="first">dictionarie keyed by group or user with values of lists of groups or users
depending on key_by_group bool</p>
<blockquote class="last">
<div><dl class="docutils">
<dt>example keyed by user: {&#8216;sharrell&#8217;: [&#8216;cs&#8217;, &#8216;bio&#8217;],</dt>
<dd>&#8216;shuey&#8217;: [&#8216;cs&#8217;]}</dd>
<dt>example keyed by group: {&#8216;cs&#8217;: [&#8216;shuey&#8217;, &#8216;sharrell&#8217;]</dt>
<dd>&#8216;bio&#8217;: [&#8216;sharrell&#8217;]</dd>
</dl>
</div></blockquote>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.ListUsers">
<tt class="descname">ListUsers</tt><big>(</big><em>user_name=None</em>, <em>access_level=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.ListUsers"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.ListUsers" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists one or many users, if all args are None then list them all.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>user_name: string of user name
access_level: int from 0-255 as defined in user.py</dd>
<dt>Output:</dt>
<dd><dl class="first last docutils">
<dt>dictionary: keyed by the user name with value of access_level.</dt>
<dd><dl class="first last docutils">
<dt>example: {&#8216;sharrell&#8217;: 128,</dt>
<dd>&#8216;shuey&#8217;: 64}</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.ListViewAssignments">
<tt class="descname">ListViewAssignments</tt><big>(</big><em>view_superset=None</em>, <em>view_subset=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.ListViewAssignments"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.ListViewAssignments" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists view assignments.</p>
<p>For more informaton about view assignments please read the
MakeViewAssignment docstring.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>view_superset: string of view name
view_subset: string of view name</dd>
<dt>Outputs:</dt>
<dd>dictionary keyed by view supersets with values lists of view subsets</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.ListViewDependencies">
<tt class="descname">ListViewDependencies</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.ListViewDependencies"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.ListViewDependencies" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists all view dependencies.</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd>list: list of view dependencies</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.ListViewToACLAssignments">
<tt class="descname">ListViewToACLAssignments</tt><big>(</big><em>view_name=None</em>, <em>dns_server_set=None</em>, <em>acl_name=None</em>, <em>acl_range_allowed=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.ListViewToACLAssignments"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.ListViewToACLAssignments" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists some or all view to acl assignments corresponding to the
given args.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>view_name: string of view name
dns_server_set: string of dns_server_set name
acl_name: string of acl name</dd>
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>list: list contains dictionaries of assignments</dt>
<dd><dl class="first last docutils">
<dt>example: [{&#8216;view_name&#8217;: &#8216;main_view&#8217;, &#8216;acl_name&#8217;: &#8216;internal&#8217;,</dt>
<dd><blockquote class="first">
<div>&#8216;acl_range_allowed&#8217;: &#8216;true&#8217;},</div></blockquote>
<dl class="last docutils">
<dt>{&#8216;view_name&#8217;: &#8216;other_view&#8217;, &#8216;acl_name&#8217;: &#8216;external&#8217;,</dt>
<dd>&#8216;acl_range_allowed&#8217;: &#8216;false&#8217;}]</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.ListViews">
<tt class="descname">ListViews</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.ListViews"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.ListViews" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists all views.</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd>views_list: List of view names. ex - [u&#8217;test_view_1&#8217;, u&#8217;test_view_2&#8217;]</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.ListZoneTypes">
<tt class="descname">ListZoneTypes</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.ListZoneTypes"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.ListZoneTypes" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists zone types.</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd>list: list of zone types, example: [&#8216;master&#8217;, &#8216;slave&#8217;, &#8216;forward&#8217;]</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.ListZones">
<tt class="descname">ListZones</tt><big>(</big><em>zone_name=None</em>, <em>zone_type=None</em>, <em>zone_origin=None</em>, <em>view_name=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.ListZones"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.ListZones" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists zones.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_name: string of zone name
zone_type: string of zone type
zone_origin: string of zone origin. ex dept.univiersity.edu.
view_name: string of view name</dd>
<dt>Outputs:</dt>
<dd><p class="first">Dictionary of dictionaries. The parent dictionary is keyed by zone name,
the secondary dictionary is keyed by view name and the third is keyed
by type of data.</p>
<blockquote class="last">
<div><dl class="docutils">
<dt>example:</dt>
<dd><dl class="first last docutils">
<dt>{&#8216;zone.university.edu&#8217;: {&#8216;internal&#8217;: {&#8216;zone_type&#8217;: &#8216;master&#8217;,</dt>
<dd><blockquote class="first">
<div><blockquote>
<div><p>&#8216;zone_options&#8217;: &#8216;misc opts&#8217;,
&#8216;zone_origin&#8217;:</p>
<blockquote>
<div>&#8216;university.edu.&#8217;},</div></blockquote>
</div></blockquote>
<dl class="docutils">
<dt>&#8216;any&#8217;: {&#8216;zone_type&#8217;: &#8216;master&#8217;</dt>
<dd>&#8216;zone_options&#8217;: &#8216;other options&#8217;,
&#8216;zone_origin&#8217;: &#8216;university.edu.&#8217;}},</dd>
</dl>
</div></blockquote>
<dl class="last docutils">
<dt>&#8216;otherzone.university.edu&#8217;: {&#8216;any&#8217;: {&#8216;zone_type&#8217;: &#8216;slave&#8217;,</dt>
<dd>&#8216;zone_options&#8217;: &#8216;options&#8217;}}}</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</div></blockquote>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.MakeACL">
<tt class="descname">MakeACL</tt><big>(</big><em>acl_name</em>, <em>cidr_block</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.MakeACL"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.MakeACL" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes an acl from args.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>acl_name: string of acl name
cidr_block: string of valid CIDR block or IP address</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.MakeDnsServer">
<tt class="descname">MakeDnsServer</tt><big>(</big><em>dns_server_name</em>, <em>dns_server_ssh_username</em>, <em>dns_server_bind_dir</em>, <em>dns_server_test_dir</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.MakeDnsServer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.MakeDnsServer" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes one dns server</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd><p class="first">dns_server_name: string of the dns server name
dns_server_ssh_username: string of the ssh user on the server
dns_server_bind_dir: string of the absolute path to the bind directory</p>
<blockquote>
<div>example: u&#8217;/etc/bind/&#8217;</div></blockquote>
<p class="last">dns_server_test_dir: string of the absolute path to the test directory</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.MakeDnsServerSet">
<tt class="descname">MakeDnsServerSet</tt><big>(</big><em>dns_server_set_name</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.MakeDnsServerSet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.MakeDnsServerSet" title="Permalink to this definition">¶</a></dt>
<dd><p>Make dns server set.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>dns_server_set_name: string of dns server set name</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.MakeDnsServerSetAssignments">
<tt class="descname">MakeDnsServerSetAssignments</tt><big>(</big><em>dns_server_name</em>, <em>dns_server_set_name</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.MakeDnsServerSetAssignments"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.MakeDnsServerSetAssignments" title="Permalink to this definition">¶</a></dt>
<dd><p>Make dns server set assignment.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>dns_server_name: string of dns server name
dns_server_set_name: string of dns server set name</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.MakeDnsServerSetViewAssignments">
<tt class="descname">MakeDnsServerSetViewAssignments</tt><big>(</big><em>view_name</em>, <em>view_order</em>, <em>dns_server_set_name</em>, <em>view_options=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.MakeDnsServerSetViewAssignments"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.MakeDnsServerSetViewAssignments" title="Permalink to this definition">¶</a></dt>
<dd><p>Make dns server set view assignment</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd><p class="first">view_name: string of the view name
view_order: order that views should be added to named.conf
dns_server_set_name: string of the dns server set name
view_options: string of view options, defaults to empty string.</p>
<blockquote class="last">
<div><dl class="docutils">
<dt>for information on valid view options read:</dt>
<dd><a class="reference external" href="http://www.bind9.net/manual/bind/9.3.2/Bv9ARM.ch06.html#view_statement_grammar">http://www.bind9.net/manual/bind/9.3.2/Bv9ARM.ch06.html#view_statement_grammar</a></dd>
</dl>
</div></blockquote>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.MakeForwardZonePermission">
<tt class="descname">MakeForwardZonePermission</tt><big>(</big><em>zone_name</em>, <em>group_name</em>, <em>group_permission=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.MakeForwardZonePermission"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.MakeForwardZonePermission" title="Permalink to this definition">¶</a></dt>
<dd><p>Make forward zone permission.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_name: string of zone name
group_name: string of group name
group_permission: list group permissions, i.e., [&#8216;a&#8217;, &#8216;aaaa&#8217;, &#8216;cname&#8217;]</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.MakeGroup">
<tt class="descname">MakeGroup</tt><big>(</big><em>group_name</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.MakeGroup"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.MakeGroup" title="Permalink to this definition">¶</a></dt>
<dd><p>Make group.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>group_name: string of group name</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.MakeInfiniteCredential">
<tt class="descname">MakeInfiniteCredential</tt><big>(</big><em>user_name</em>, <em>credential=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.MakeInfiniteCredential"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.MakeInfiniteCredential" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates an infinite credential.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>user_name: string of user to create credential for.</dd>
<dt>Outputs:</dt>
<dd>string: credential string created</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.MakeNamedConfGlobalOption">
<tt class="descname">MakeNamedConfGlobalOption</tt><big>(</big><em>dns_server_set</em>, <em>options</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.MakeNamedConfGlobalOption"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.MakeNamedConfGlobalOption" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes named conf global option</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>dns_server_set: string of name of dns server set
options: string of named conf file</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.MakeRecord">
<tt class="descname">MakeRecord</tt><big>(</big><em>record_type</em>, <em>target</em>, <em>zone_name</em>, <em>record_args_dict</em>, <em>view_name=None</em>, <em>ttl=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.MakeRecord"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.MakeRecord" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes a record.</p>
<p>Please check core_helpers for functions to make certain records that
need help before using this directly. For instance MakePTRRecord and
MakeAAAARecord.</p>
<dl class="docutils">
<dt>Raises:</dt>
<dd>InvalidInputError: &#8221;.&#8221; not allowed as terminator in non-ptr target.
InvalidInputError: An SOA cannot be made in the &#8220;any&#8221; view.
InvalidInputError: CNAME already exists.
InvalidInputError: Record already exists.
InvalidInputError: Duplicate record found.</dd>
<dt>Inputs:</dt>
<dd><p class="first">record_type: string of record type (example: u&#8217;mx&#8217;)
target: string of target (example u&#8217;machine-01&#8217;)
zone_name: string of zone name (example u&#8217;sub.university.edu&#8217;)
ttl: int of time to live per record
view_name: string of view name (example u&#8217;internal&#8217;)
record_args_dict: dictionary, which is different for each record type.</p>
<blockquote class="last">
<div><p>an example dictionary can be obtained with the
GetEmptyRecordArgsDict function in this class
(example: {u&#8217;priority&#8217;: 10,</p>
<blockquote>
<div>u&#8217;mail_server&#8217;: &#8216;mail.sub.university.edu.&#8217;})</div></blockquote>
</div></blockquote>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.MakeReservedWord">
<tt class="descname">MakeReservedWord</tt><big>(</big><em>reserved_word</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.MakeReservedWord"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.MakeReservedWord" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a reserved word.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>reserved_word: string of reserved word</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.MakeReverseRangePermission">
<tt class="descname">MakeReverseRangePermission</tt><big>(</big><em>cidr_block</em>, <em>group_name</em>, <em>group_permission=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.MakeReverseRangePermission"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.MakeReverseRangePermission" title="Permalink to this definition">¶</a></dt>
<dd><p>Make reverse range permission.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>cidr_block: string of cidr block
group_name: string of group name
group_permission: list of group permissions, i.e., [&#8216;cname&#8217;, &#8216;ptr&#8217;]</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.MakeReverseRangeZoneAssignment">
<tt class="descname">MakeReverseRangeZoneAssignment</tt><big>(</big><em>zone_name</em>, <em>cidr_block</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.MakeReverseRangeZoneAssignment"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.MakeReverseRangeZoneAssignment" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes a reverse range to zone assignment.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_name: string of zone name
cidr_block: string of cidr block</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.MakeUser">
<tt class="descname">MakeUser</tt><big>(</big><em>user_name</em>, <em>access_level</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.MakeUser"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.MakeUser" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a user.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>user_name: string of user name
access_level: int from 0-255 as defined in user.py</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.MakeUserGroupAssignment">
<tt class="descname">MakeUserGroupAssignment</tt><big>(</big><em>user_name</em>, <em>group_name</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.MakeUserGroupAssignment"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.MakeUserGroupAssignment" title="Permalink to this definition">¶</a></dt>
<dd><p>Make user-group assignment.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>group_name: string of group name
user_name: string of user name</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.MakeView">
<tt class="descname">MakeView</tt><big>(</big><em>view_name</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.MakeView"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.MakeView" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes a view and all of the other things that go with a view.</p>
<p>For more information about views please see docstring for
MakeViewAssignments.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>view_name: string of view name</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.MakeViewAssignment">
<tt class="descname">MakeViewAssignment</tt><big>(</big><em>view_superset</em>, <em>view_subset</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.MakeViewAssignment"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.MakeViewAssignment" title="Permalink to this definition">¶</a></dt>
<dd><p>Assigns a view to view.</p>
<p>A view contains zones in that view. However zones can be assigned
to another view that is a superset of views. For example
an assignment can be made for view_a(view_superset) to also include
all of view_b&#8217;s(view_subset) zones(and by proxy, records). This
prevents having to have duplicate records in each view.</p>
<p>Most of the time this will not be needed as there is a special
subset included in all views(unless explicitly deleted) called the
&#8216;any&#8217; view. Records in the &#8216;any&#8217; view will be in all views that
have not been explicity changed to remove the &#8216;any&#8217; view.</p>
<p>The &#8216;any&#8217; view subset is automatically tied to a view when a
view is created. Also this is the default view for records
and zones(again it can be explicitly changed if needed).</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>view_superset: string of view name
view_subset: string of view name</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.MakeViewToACLAssignments">
<tt class="descname">MakeViewToACLAssignments</tt><big>(</big><em>view_name</em>, <em>dns_server_set_name</em>, <em>acl_name</em>, <em>acl_range_allowed</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.MakeViewToACLAssignments"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.MakeViewToACLAssignments" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes view to acl assignment</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>view_name: string of view name
dns_server_set_name: string of dns_server_set name
acl_name: string of acl name
acl_range_allowed: boolean to allow/disallow given acl range</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.MakeZone">
<tt class="descname">MakeZone</tt><big>(</big><em>zone_name</em>, <em>zone_type</em>, <em>zone_origin</em>, <em>view_name=None</em>, <em>zone_options=None</em>, <em>make_any=True</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.MakeZone"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.MakeZone" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes a zone.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd><p class="first">zone_name: string of zone name
zone_type: string of zone type
zone_origin: string of zone origin. ex dept.univiersity.edu.
zone_options: string of zone_options(defaults to empty string)</p>
<blockquote>
<div><dl class="docutils">
<dt>valid zone options can be found here:</dt>
<dd><a class="reference external" href="http://www.bind9.net/manual/bind/9.3.2/Bv9ARM.ch06.html#zone_statement_grammar">http://www.bind9.net/manual/bind/9.3.2/Bv9ARM.ch06.html#zone_statement_grammar</a></dd>
</dl>
</div></blockquote>
<dl class="docutils">
<dt>view_name: string of view name(defaults to &#8216;any&#8217;)</dt>
<dd>see docstring of MakeViewAssignments as to why &#8216;any&#8217; is default</dd>
</dl>
<p class="last">make_any: regardless of view name, make any as well(default to True)</p>
</dd>
<dt>Raises:</dt>
<dd>UnexpectedDataError: Invalid zone type.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.MakeZoneType">
<tt class="descname">MakeZoneType</tt><big>(</big><em>zone_type</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.MakeZoneType"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.MakeZoneType" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes a new zone type.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_type: string of zone type</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.RemoveACL">
<tt class="descname">RemoveACL</tt><big>(</big><em>acl_name</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.RemoveACL"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.RemoveACL" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes an acl from args. Will also remove relevant acl-view assignments.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>acl_name: string of acl name</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.RemoveCIDRBlockFromACL">
<tt class="descname">RemoveCIDRBlockFromACL</tt><big>(</big><em>acl_name</em>, <em>cidr_block</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.RemoveCIDRBlockFromACL"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.RemoveCIDRBlockFromACL" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes CIDR Block from ACL</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>acl_name: string of acl name
cidr_block: string of valid CIDR block or IP address
range_allowed: Int bool of if range should be allowed or denied</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.RemoveCredential">
<tt class="descname">RemoveCredential</tt><big>(</big><em>credential=None</em>, <em>user_name=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.RemoveCredential"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.RemoveCredential" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes a credential</p>
<p>This function will call _RemoveCredential after Authorize and then log it.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>credential: string of credential to remove
user_name: string of user name who has a credential to remove</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.RemoveDnsServer">
<tt class="descname">RemoveDnsServer</tt><big>(</big><em>dns_server_name</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.RemoveDnsServer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.RemoveDnsServer" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes dns server.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>dns_server_name: string of dns server name</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.RemoveDnsServerSet">
<tt class="descname">RemoveDnsServerSet</tt><big>(</big><em>dns_server_set_name</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.RemoveDnsServerSet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.RemoveDnsServerSet" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove dns server set.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>dns_server_set_name: string of dns server set name</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.RemoveDnsServerSetAssignments">
<tt class="descname">RemoveDnsServerSetAssignments</tt><big>(</big><em>dns_server_name</em>, <em>dns_server_set_name</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.RemoveDnsServerSetAssignments"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.RemoveDnsServerSetAssignments" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove a dns server set assignment</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>dns_server_name: string of dns server name
dns_server_set_name: string of dns server set name</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.RemoveDnsServerSetViewAssignments">
<tt class="descname">RemoveDnsServerSetViewAssignments</tt><big>(</big><em>view_name</em>, <em>dns_server_set_name</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.RemoveDnsServerSetViewAssignments"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.RemoveDnsServerSetViewAssignments" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove dns server set view assignment</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>view_name: string of view name
dns_server_set_name: string of dns server set name</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.RemoveForwardZonePermission">
<tt class="descname">RemoveForwardZonePermission</tt><big>(</big><em>zone_name</em>, <em>group_name</em>, <em>group_permission</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.RemoveForwardZonePermission"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.RemoveForwardZonePermission" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove forward zone permissions.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_name: string of zone name
group_name: string of group name
group_permission: list of group permissions, i.e., [&#8216;a&#8217;, &#8216;aaaa&#8217;, &#8216;cname&#8217;]</dd>
<dt>Outputs:</dt>
<dd>int: number of rows affected</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.RemoveGroup">
<tt class="descname">RemoveGroup</tt><big>(</big><em>group_name</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.RemoveGroup"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.RemoveGroup" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove group.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>group_name: string of group name</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.RemoveRecord">
<tt class="descname">RemoveRecord</tt><big>(</big><em>record_type</em>, <em>target</em>, <em>zone_name</em>, <em>record_args_dict</em>, <em>view_name</em>, <em>ttl=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.RemoveRecord"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.RemoveRecord" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove record.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>record_type: type of record
target: target name
zone_name: name of zone
record_args_dict: dictionary of record arguments
view_name: name of view
ttl: time to live</dd>
<dt>Raises:</dt>
<dd><dl class="first docutils">
<dt>InvalidInputError: No records found.</dt>
<dd>Multiple records found for used search terms.</dd>
</dl>
<p class="last">RecordError: Could not remove record for an unknown reason.</p>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.RemoveReservedWord">
<tt class="descname">RemoveReservedWord</tt><big>(</big><em>reserved_word</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.RemoveReservedWord"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.RemoveReservedWord" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes a reserved word.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>reserved_word: string of reserved word</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.RemoveReverseRangePermission">
<tt class="descname">RemoveReverseRangePermission</tt><big>(</big><em>cidr_block</em>, <em>group_name</em>, <em>group_permission</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.RemoveReverseRangePermission"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.RemoveReverseRangePermission" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove reverse range permissions.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>cidr_block: string of cidr block
group_name: string of group name
group_permission: list of group permissions, i.e., [&#8216;a&#8217;, &#8216;aaaa&#8217;, &#8216;cname&#8217;]</dd>
<dt>Outputs:</dt>
<dd>int: number of rows affected</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.RemoveReverseRangeZoneAssignment">
<tt class="descname">RemoveReverseRangeZoneAssignment</tt><big>(</big><em>zone_name</em>, <em>cidr_block</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.RemoveReverseRangeZoneAssignment"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.RemoveReverseRangeZoneAssignment" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove reverse range to zone assignment.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_name: string of zone name
cidr_block: string of cidr block</dd>
<dt>Outputs:</dt>
<dd>int: number of rows affected</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.RemoveUser">
<tt class="descname">RemoveUser</tt><big>(</big><em>user_name</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.RemoveUser"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.RemoveUser" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes a user.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>user_name: string of user name</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.RemoveUserGroupAssignment">
<tt class="descname">RemoveUserGroupAssignment</tt><big>(</big><em>user_name</em>, <em>group_name</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.RemoveUserGroupAssignment"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.RemoveUserGroupAssignment" title="Permalink to this definition">¶</a></dt>
<dd><p>Remove user-group.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>group_name: string of group name
user_name: string of user name</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.RemoveView">
<tt class="descname">RemoveView</tt><big>(</big><em>view_name</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.RemoveView"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.RemoveView" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes a view.</p>
<p>Also removes anything attatched to that view. Including any information
about a specific zone in the view and any records in that view.
Please point gun away from foot.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>view_name: string of view name</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: Cannot remove view any</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.RemoveViewAssignment">
<tt class="descname">RemoveViewAssignment</tt><big>(</big><em>view_superset</em>, <em>view_subset</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.RemoveViewAssignment"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.RemoveViewAssignment" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes a view assignment.</p>
<p>For more informaton about view assignments please read the
MakeViewAssignment docstring.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>view_superset: string of view name
view_subset: string of view name</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.RemoveViewToACLAssignments">
<tt class="descname">RemoveViewToACLAssignments</tt><big>(</big><em>view_name</em>, <em>dns_server_set_name</em>, <em>acl_name</em>, <em>acl_range_allowed</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.RemoveViewToACLAssignments"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.RemoveViewToACLAssignments" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes view to acl assignment</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>view_name: string of view name
dns_server_set_name: string of dns_server_set name
acl_name: string of acl name</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.RemoveZone">
<tt class="descname">RemoveZone</tt><big>(</big><em>zone_name</em>, <em>view_name=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.RemoveZone"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.RemoveZone" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes a zone.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_name: string of zone name
view_name: string of view name</dd>
<dt>Outputs:</dt>
<dd>int: number of rows affected</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.RemoveZoneType">
<tt class="descname">RemoveZoneType</tt><big>(</big><em>zone_type</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.RemoveZoneType"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.RemoveZoneType" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes a zone type.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_type: string of zone type</dd>
<dt>Outputs:</dt>
<dd>int: number of rows affected</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.SetMaintenanceFlag">
<tt class="descname">SetMaintenanceFlag</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.SetMaintenanceFlag"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.SetMaintenanceFlag" title="Permalink to this definition">¶</a></dt>
<dd><p>Sets maintenance flag</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>value: boolean of flag on or off</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.UpdateDnsServer">
<tt class="descname">UpdateDnsServer</tt><big>(</big><em>search_dns_server_name</em>, <em>update_dns_server_name</em>, <em>update_dns_server_ssh_username</em>, <em>update_dns_server_bind_dir</em>, <em>update_dns_server_test_dir</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.UpdateDnsServer"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.UpdateDnsServer" title="Permalink to this definition">¶</a></dt>
<dd><p>Updates dns server</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>search_dns_server_name: string of dns server name
update_dns_server_name: new string of dns server name
update_dns_server_ssh_username: new string of dns server username
update_dns_server_bind_dir: new string of path to the bind directory
update_dns_server_test_dir: new string of path to the test directory</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.UpdateDnsServerSet">
<tt class="descname">UpdateDnsServerSet</tt><big>(</big><em>search_dns_server_set_name</em>, <em>update_dns_server_set_name</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.UpdateDnsServerSet"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.UpdateDnsServerSet" title="Permalink to this definition">¶</a></dt>
<dd><p>Update dns_server_set.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>search_dns_server_set_name: string of dns_server_set name
update_dns_server_set_name: string of dns_server_set name</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.UpdateDnsServerSetViewAssignments">
<tt class="descname">UpdateDnsServerSetViewAssignments</tt><big>(</big><em>search_dns_server_set_name</em>, <em>search_view_name</em>, <em>update_view_order=None</em>, <em>update_view_options=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.UpdateDnsServerSetViewAssignments"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.UpdateDnsServerSetViewAssignments" title="Permalink to this definition">¶</a></dt>
<dd><p>Update dns_server_set&#8217;s view order and view options</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd><p class="first">search_view_name: string of view name
search_dns_server_set_name: string of dns_server_set name
update_view_order: int of new view order
update_view_options: string of view options,</p>
<blockquote class="last">
<div><dl class="docutils">
<dt>for information on valid view options read:</dt>
<dd><a class="reference external" href="http://www.bind9.net/manual/bind/9.3.2/Bv9ARM.ch06.html#view_statement_grammar">http://www.bind9.net/manual/bind/9.3.2/Bv9ARM.ch06.html#view_statement_grammar</a></dd>
</dl>
</div></blockquote>
</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.UpdateGroup">
<tt class="descname">UpdateGroup</tt><big>(</big><em>search_group_name</em>, <em>update_group_name</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.UpdateGroup"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.UpdateGroup" title="Permalink to this definition">¶</a></dt>
<dd><p>Update group.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>search_group_name: string of group name
update_group_name: string of group name</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.UpdateGroupForwardPermission">
<tt class="descname">UpdateGroupForwardPermission</tt><big>(</big><em>zone_name</em>, <em>group_name</em>, <em>new_permissions</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.UpdateGroupForwardPermission"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.UpdateGroupForwardPermission" title="Permalink to this definition">¶</a></dt>
<dd><p>Updates forward zone group permissions</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_name: string of zone name
group_name: string of group name
new_permissions: list of permissions. (ex [u&#8217;a&#8217;, u&#8217;aaaa&#8217;, u&#8217;cname&#8217;])</dd>
<dt>Raises:</dt>
<dd>AuthorizationError: Group does not have access to supplied zone</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.UpdateGroupReversePermission">
<tt class="descname">UpdateGroupReversePermission</tt><big>(</big><em>cidr_block</em>, <em>group_name</em>, <em>new_permissions</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.UpdateGroupReversePermission"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.UpdateGroupReversePermission" title="Permalink to this definition">¶</a></dt>
<dd><p>Updates forward zone group permissions</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>cidr_block: string of cidr_block
group_name: string of group name
new_permissions: list of permissions. (ex [u&#8217;a&#8217;, u&#8217;aaaa&#8217;, u&#8217;cname&#8217;])</dd>
<dt>Raises:</dt>
<dd>AuthorizationError: Group does not have access to supplied cidr block</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.UpdateRecord">
<tt class="descname">UpdateRecord</tt><big>(</big><em>search_record_type</em>, <em>search_target</em>, <em>search_zone_name</em>, <em>search_record_args_dict</em>, <em>search_view_name=None</em>, <em>search_ttl=None</em>, <em>update_target=None</em>, <em>update_zone_name=None</em>, <em>update_record_args_dict={}</em>, <em>update_view_name=None</em>, <em>update_ttl=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.UpdateRecord"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.UpdateRecord" title="Permalink to this definition">¶</a></dt>
<dd><p>Update record.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>search_record_type: type of record
search_target: target
search_zone_name: name of zone
search_record_args_dict: dictionary of record arguments
search_view_name: name of view
search_ttl: time to live
update_target: target
update_zone_name: name of zone
update_record_args_dict: dictionary of record arguments
update_view_name: name of view
update_ttl: time to live</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: &#8221;.&#8221; not allowed as terminator in non-ptr target.
InvalidInputError: Record already exists.
InvalidInputError: CNAME already exists.
InvalidInputError: Duplicate record found.
InvalidInputError: No records found.
InvalidInputError: Multiple records found for used search terms.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.UpdateUser">
<tt class="descname">UpdateUser</tt><big>(</big><em>search_user_name</em>, <em>update_user_name=None</em>, <em>update_access_level=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.UpdateUser"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.UpdateUser" title="Permalink to this definition">¶</a></dt>
<dd><p>Updates a user.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>search_user_name: string of user name
update_user_name: string of user name
update_access_level: int from 0-255 as defined in user.py</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.UpdateView">
<tt class="descname">UpdateView</tt><big>(</big><em>search_view_name</em>, <em>update_view_name=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.UpdateView"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.UpdateView" title="Permalink to this definition">¶</a></dt>
<dd><p>Updates a view.</p>
<p>Also updates anything attatched to that view. Including any information
about a specific zone in the view and any records in that view.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>search_view_name: string of view name to be updated
update_view_name: string of view name to update with</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: Cannot update view any.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core.Core.UpdateZone">
<tt class="descname">UpdateZone</tt><big>(</big><em>search_zone_name</em>, <em>search_view_name=None</em>, <em>update_zone_name=None</em>, <em>update_zone_options=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core.html#Core.UpdateZone"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core.Core.UpdateZone" title="Permalink to this definition">¶</a></dt>
<dd><p>Updates zone options or zone type of zone</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd><p class="first">search_zone_name: string of zone name
search_view_name: string of view name
update_zone_name: string of zone name
update_zone_options: string of zone options</p>
<blockquote class="last">
<div><dl class="docutils">
<dt>valid zone options can be found here:</dt>
<dd><a class="reference external" href="http://www.bind9.net/manual/bind/9.3.2/Bv9ARM.ch06.html#zone_statement_grammar">http://www.bind9.net/manual/bind/9.3.2/Bv9ARM.ch06.html#zone_statement_grammar</a></dd>
</dl>
</div></blockquote>
</dd>
<dt>Outputs:</dt>
<dd>int: number of rows affected</dd>
</dl>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-roster_core.core_helpers">
<span id="core-helpers-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">core_helpers</span></tt> Module<a class="headerlink" href="#module-roster_core.core_helpers" title="Permalink to this headline">¶</a></h2>
<p>Core helper functions.</p>
<dl class="class">
<dt id="roster_core.core_helpers.CoreHelpers">
<em class="property">class </em><tt class="descclassname">roster_core.core_helpers.</tt><tt class="descname">CoreHelpers</tt><big>(</big><em>core_instance</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>Library of helper functions that extend the core functions.</p>
<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.AddFormattedRecords">
<tt class="descname">AddFormattedRecords</tt><big>(</big><em>zone_name</em>, <em>zone_file_string</em>, <em>view</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.AddFormattedRecords"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.AddFormattedRecords" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds records from a string of a partial zone file</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_name: string of zone name
zone_file_string: string of the file contents
view: string of view name</dd>
<dt>Outputs:</dt>
<dd>int: Amount of records added to db.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.CIDRExpand">
<tt class="descname">CIDRExpand</tt><big>(</big><em>cidr_block</em>, <em>begin=None</em>, <em>end=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.CIDRExpand"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.CIDRExpand" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.ConstructRecordArgsDictFromRecordID">
<tt class="descname">ConstructRecordArgsDictFromRecordID</tt><big>(</big><em>record_id</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.ConstructRecordArgsDictFromRecordID"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.ConstructRecordArgsDictFromRecordID" title="Permalink to this definition">¶</a></dt>
<dd><p>Constructs the records_arg_dict from the Roster database given only 
the record id.</p>
<p>Inputs:
record_id: int of record id</p>
<p>Outputs:
record_args_dict: dictionary of arguments and their values</p>
</dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.ExpandIPV6">
<tt class="descname">ExpandIPV6</tt><big>(</big><em>ip_address</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.ExpandIPV6"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.ExpandIPV6" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.GetAssociatedCNAMEs">
<tt class="descname">GetAssociatedCNAMEs</tt><big>(</big><em>hostname</em>, <em>view_name</em>, <em>zone_name</em>, <em>recursive=False</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.GetAssociatedCNAMEs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.GetAssociatedCNAMEs" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists cname&#8217;s by assignment hostname.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>hostname: string of hostname
view_name: string of view name
zone_name: string of zone name</dd>
<dt>Outputs:</dt>
<dd>list: list of found cname dictionaries</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.GetCIDRBlocksByView">
<tt class="descname">GetCIDRBlocksByView</tt><big>(</big><em>view</em>, <em>username</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.GetCIDRBlocksByView"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.GetCIDRBlocksByView" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists CIDR blocks available to a username in a given view</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>view: string of view name
username: string of user name</dd>
<dt>Outputs:</dt>
<dd>list: list of cidr block strings</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.GetPTRTarget">
<tt class="descname">GetPTRTarget</tt><big>(</big><em>long_target</em>, <em>view_name=u'any'</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.GetPTRTarget"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.GetPTRTarget" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets the short PTR target given the long PTR target
Inputs:</p>
<blockquote>
<div>long_target: String of long PTR target
view_name: String of view name</div></blockquote>
<dl class="docutils">
<dt>Raises:</dt>
<dd>InvalidInputError: No suitable reverse range zone assignments found.</dd>
<dt>Outputs:</dt>
<dd>string: String of short PTR target</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.GetViewsByUser">
<tt class="descname">GetViewsByUser</tt><big>(</big><em>username</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.GetViewsByUser"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.GetViewsByUser" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists view names available to given username</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>username: string of user name</dd>
<dt>Outputs:</dt>
<dd>list: list of view name strings</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.ListAccessLevels">
<tt class="descname">ListAccessLevels</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.ListAccessLevels"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.ListAccessLevels" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists access levels from constants for both integer and string keys</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd>dict: dictionary of access levels with both string and integer-string keys</dd>
<dt>Example:</dt>
<dd><dl class="first last docutils">
<dt>{&#8216;32&#8217;: 32, &#8216;64&#8217;: 64, &#8216;128&#8217;: 128, &#8216;user&#8217;: 32, &#8216;unlocked_user&#8217;: 64,</dt>
<dd>&#8216;dns_admin&#8217;: 128}</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.ListAvailableIpsInCIDR">
<tt class="descname">ListAvailableIpsInCIDR</tt><big>(</big><em>cidr_block</em>, <em>num_ips=1</em>, <em>view_name=None</em>, <em>zone_name=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.ListAvailableIpsInCIDR"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.ListAvailableIpsInCIDR" title="Permalink to this definition">¶</a></dt>
<dd><p>Finds first available ips. Only lists as many IPs as are available.
Returns empty list if no IPs are available in given cidr block and a
truncated list if only a portion of IPs are available.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>cidr_block: string of ipv4 or ipv6 cidr block</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: IP is in a reserved IP space.
InvalidInputError: Not a valid cidr block</dd>
<dt>Outputs:</dt>
<dd>list: list of strings of ip addresses</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.ListGroupPermissions">
<tt class="descname">ListGroupPermissions</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.ListGroupPermissions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.ListGroupPermissions" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.ListLatestNamedConfig">
<tt class="descname">ListLatestNamedConfig</tt><big>(</big><em>dns_server_set</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.ListLatestNamedConfig"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.ListLatestNamedConfig" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists the latest named config string given dns server set</p>
<p>This function is duplicated in
roster-config-manager/roster_config_manager/tree_exporter.py</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>dns_server_set: string of dns server set name</dd>
<dt>Outputs:</dt>
<dd>dict: dictionary of latest named config</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.ListNamedConfGlobalOptionsClient">
<tt class="descname">ListNamedConfGlobalOptionsClient</tt><big>(</big><em>option_id=None</em>, <em>dns_server_set=None</em>, <em>timestamp=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.ListNamedConfGlobalOptionsClient"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.ListNamedConfGlobalOptionsClient" title="Permalink to this definition">¶</a></dt>
<dd><p>Converts XMLRPC datetime to datetime object and runs
ListNamedConfGlobalOptions</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>option_id: integer of the option id
dns_server_set: string of the dns server set name
timestamp: XMLRPC datetime timestamp</dd>
<dt>Outputs:</dt>
<dd>list: list of dictionarires from ListNamedConfGlobalOptions</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.ListRecordsByCIDRBlock">
<tt class="descname">ListRecordsByCIDRBlock</tt><big>(</big><em>cidr_block</em>, <em>view_name=None</em>, <em>zone_name=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.ListRecordsByCIDRBlock"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.ListRecordsByCIDRBlock" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists records in a given cidr block.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>cidr_block: string of ipv4 or ipv6 cidr block
view_name: string of the view
zone_name: string of the zone</dd>
<dt>Raise:</dt>
<dd>InvalidInputError: The CIDR block specified does not contain a valid IP
IPIndexError: Record type not indexable by IP
IPIndexError: Record type unknown. Missing ipv4 or ipv6 dec index</dd>
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>dict: A dictionary Keyed by view, keyed by IP, listed by record.</dt>
<dd><dl class="first last docutils">
<dt>example:</dt>
<dd><dl class="first last docutils">
<dt>{u&#8217;test_view&#8217;:</dt>
<dd><dl class="first last docutils">
<dt>{u&#8216;192.168.1.8&#8217;:</dt>
<dd><dl class="first last docutils">
<dt>[{u&#8217;forward&#8217;: True,</dt>
<dd><blockquote class="first">
<div>u&#8217;host&#8217;: u&#8217;host6.university.edu&#8217;,
u&#8217;zone&#8217;: u&#8217;forward_zone&#8217;,
u&#8217;zone_origin&#8217;: u&#8217;university.edu.&#8217;},</div></blockquote>
<dl class="last docutils">
<dt>{u&#8217;forward&#8217;: False,</dt>
<dd>u&#8217;host&#8217;: u&#8217;host6.university.edu&#8217;,
u&#8217;zone&#8217;: u&#8217;reverse_zone&#8217;,
u&#8217;zone_origin&#8217;: u&#8216;1.168.192.in-addr.arpa.&#8217;}]}}</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.ListRecordsByZone">
<tt class="descname">ListRecordsByZone</tt><big>(</big><em>zone_name</em>, <em>view_name=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.ListRecordsByZone"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.ListRecordsByZone" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists records in a given zone.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_name: name of the zone
view_name: name of the view</dd>
<dt>Output:</dt>
<dd><dl class="first last docutils">
<dt>dict: A dictionary Keyed by view, keyed by IP, listed by record.</dt>
<dd><dl class="first last docutils">
<dt>example:</dt>
<dd><dl class="first last docutils">
<dt>{u&#8217;test_view&#8217;:</dt>
<dd><dl class="first last docutils">
<dt>{u&#8216;192.168.1.8&#8217;:</dt>
<dd><dl class="first last docutils">
<dt>[{u&#8217;forward&#8217;: True,</dt>
<dd><blockquote class="first">
<div>u&#8217;host&#8217;: u&#8217;host6.university.edu&#8217;,
u&#8217;zone&#8217;: u&#8217;forward_zone&#8217;,
u&#8217;zone_origin&#8217;: u&#8217;university.edu.&#8217;},</div></blockquote>
<dl class="last docutils">
<dt>{u&#8217;forward&#8217;: False,</dt>
<dd>u&#8217;host&#8217;: u&#8217;host6.university.edu&#8217;,
u&#8217;zone&#8217;: u&#8217;reverse_zone&#8217;,
u&#8217;zone_origin&#8217;: u&#8216;1.168.192.in-addr.arpa.&#8217;}]}}</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.ListSortedHostsByCIDR">
<tt class="descname">ListSortedHostsByCIDR</tt><big>(</big><em>cidr</em>, <em>zone_name=None</em>, <em>view_name=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.ListSortedHostsByCIDR"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.ListSortedHostsByCIDR" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.ListSortedHostsByZone">
<tt class="descname">ListSortedHostsByZone</tt><big>(</big><em>zone_name</em>, <em>view_name=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.ListSortedHostsByZone"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.ListSortedHostsByZone" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.ListZoneByIPAddress">
<tt class="descname">ListZoneByIPAddress</tt><big>(</big><em>ip_address</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.ListZoneByIPAddress"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.ListZoneByIPAddress" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists zone name given ip_address</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>ip_address: string of ip address</dd>
<dt>Outputs:</dt>
<dd>string: string of zone name, ex: &#8216;test_zone&#8217;</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.MakeAAAARecord">
<tt class="descname">MakeAAAARecord</tt><big>(</big><em>target</em>, <em>zone_name</em>, <em>record_args_dict</em>, <em>view_name=None</em>, <em>ttl=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.MakeAAAARecord"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.MakeAAAARecord" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes an AAAA record.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>target: string of target
zone_name: string of zone name
record_args_dict: dictionary of record arguments
view_name: string of view name
ttl: time to live</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.MakeIPv4ClasslessReverseDelegatedTargetZone">
<tt class="descname">MakeIPv4ClasslessReverseDelegatedTargetZone</tt><big>(</big><em>cidr_block</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.MakeIPv4ClasslessReverseDelegatedTargetZone"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.MakeIPv4ClasslessReverseDelegatedTargetZone" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a delegated reverse zone</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>cidr_block: string of IPv4 cidr block</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: Not a valid cidr block</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.MakeIPv4ClasslessReverseDelegation">
<tt class="descname">MakeIPv4ClasslessReverseDelegation</tt><big>(</big><em>name_server</em>, <em>cidr_block</em>, <em>view_name=u'any'</em>, <em>ttl=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.MakeIPv4ClasslessReverseDelegation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.MakeIPv4ClasslessReverseDelegation" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates classless forwarding for reverse DNS lookups</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>name_server: nameserver to add for reverse delegation
cidr_block: string of CIDR block
view_name: string of view for the reverse zone, defaults to &#8216;any&#8217;
ttl: time-to-live for the newly added records, defaults to zone ttl</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: nameserver required
InvalidInputError: cidr block range required
InvalidInputError: Not a valid zone name or CIDR block</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.MakePTRRecord">
<tt class="descname">MakePTRRecord</tt><big>(</big><em>target</em>, <em>record_args_dict</em>, <em>view_name=u'any'</em>, <em>ttl=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.MakePTRRecord"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.MakePTRRecord" title="Permalink to this definition">¶</a></dt>
<dd><p>Makes a ptr record.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>target: string of target
record_args_dict: dictionary of record arguments
view_name: string of view name
ttl: string of ttl</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.MakeSubdomainDelegation">
<tt class="descname">MakeSubdomainDelegation</tt><big>(</big><em>zone_name</em>, <em>subdomain_name</em>, <em>nameserver</em>, <em>view_name=u'any'</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.MakeSubdomainDelegation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.MakeSubdomainDelegation" title="Permalink to this definition">¶</a></dt>
<dd><p>&#8220;Makes a Delegated Subdomain
Assumes delegation zone is created</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>view_name: string of view name
zone_name: string of zone name
subdomain_name: string of subdomain name 
nameserver: string of fully qualified nameserver</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: Zone does not exist.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.ProcessRecordsBatch">
<tt class="descname">ProcessRecordsBatch</tt><big>(</big><em>delete_records=None</em>, <em>add_records=None</em>, <em>zone_import=False</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.ProcessRecordsBatch"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.ProcessRecordsBatch" title="Permalink to this definition">¶</a></dt>
<dd><p>Proccess batches of records</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd><dl class="first docutils">
<dt>delete_records: list of dictionaries of records</dt>
<dd><dl class="first last docutils">
<dt>ex: {&#8216;record_ttl&#8217;: 3600, &#8216;record_type&#8217;: u&#8217;a&#8217;,</dt>
<dd>&#8216;records_id&#8217;: 10, &#8216;record_target&#8217;: u&#8217;host1&#8217;,
&#8216;record_zone_name&#8217;: u&#8217;forward_zone&#8217;,
&#8216;record_last_user&#8217;: u&#8217;sharrell&#8217;,
&#8216;record_view_dependency&#8217;: u&#8217;test_view_dep&#8217;}
{&#8216;record_type&#8217;: &#8216;ptr&#8217;, &#8216;record_target&#8217;: &#8216;target&#8217;,
&#8216;view_name&#8217;: &#8216;view&#8217;, &#8216;zone_name&#8217;: &#8216;zone&#8217;}</dd>
</dl>
</dd>
</dl>
<p class="last">add_records: list of dictionaries of records</p>
</dd>
<dt>Raises: </dt>
<dd>RecordsBatchError: Record specification too broad
RecordsBatchError: No record found
RecordsBatchError: Record already exists
RecordsBatchError: CNAME already exists
RecordsBatchError: Duplicate record found</dd>
<dt>Outputs:</dt>
<dd>int: row count</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.RemoveCNamesByAssignmentHost">
<tt class="descname">RemoveCNamesByAssignmentHost</tt><big>(</big><em>hostname</em>, <em>view_name</em>, <em>zone_name</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.RemoveCNamesByAssignmentHost"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.RemoveCNamesByAssignmentHost" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes cname&#8217;s by assignment hostname, will not remove cnames
that the user does not have permissin to remove. The function will continue
and pass over that cname.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>hostname: string of hostname
view_name: string of view name
zone_name: string of zone name</dd>
<dt>Raises:</dt>
<dd>UnexpectedDataError: Incorrect number of records found</dd>
<dt>Outputs:</dt>
<dd>int: number of rows modified</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.RemovePTRRecord">
<tt class="descname">RemovePTRRecord</tt><big>(</big><em>record_type</em>, <em>target</em>, <em>zone_name</em>, <em>record_args_dict</em>, <em>view_name</em>, <em>ttl=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.RemovePTRRecord"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.RemovePTRRecord" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes a ptr record.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>target: string of target
record_args_dict: dictionary of record arguments
view_name: string of view name
ttl: string of ttl</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.ReverseIP">
<tt class="descname">ReverseIP</tt><big>(</big><em>ip_address</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.ReverseIP"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.ReverseIP" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.RevertNamedConfig">
<tt class="descname">RevertNamedConfig</tt><big>(</big><em>dns_server_set</em>, <em>option_id</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.RevertNamedConfig"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.RevertNamedConfig" title="Permalink to this definition">¶</a></dt>
<dd><p>Revert a Named Config file</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>option_id: the id of config to replicate
dns_server_set: string of dns server set name</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: DNS server set does not contain id.
UnexpectedDataError: Multiple configurations found.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.SortRecordsByHost">
<tt class="descname">SortRecordsByHost</tt><big>(</big><em>records_dict</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.SortRecordsByHost"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.SortRecordsByHost" title="Permalink to this definition">¶</a></dt>
<dd><p>Generates an IP list sorted by record&#8217;s host
Inputs:</p>
<blockquote>
<div><dl class="docutils">
<dt>record_dict: dictionary keyed by view, then keyed by IP</dt>
<dd>dictionary from ListRecordsByCIDRBlock
and from ListRecordsByZone</dd>
</dl>
</div></blockquote>
<dl class="docutils">
<dt>Outputs:</dt>
<dd>sorted_list: list of sorted records</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.core_helpers.CoreHelpers.UnReverseIP">
<tt class="descname">UnReverseIP</tt><big>(</big><em>ip_address</em><big>)</big><a class="reference internal" href="_modules/roster_core/core_helpers.html#CoreHelpers.UnReverseIP"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.core_helpers.CoreHelpers.UnReverseIP" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

</div>
<div class="section" id="module-roster_core.data_validation">
<span id="data-validation-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">data_validation</span></tt> Module<a class="headerlink" href="#module-roster_core.data_validation" title="Permalink to this headline">¶</a></h2>
<p>This module contains static methods for validating different kinds of data.</p>
<dl class="class">
<dt id="roster_core.data_validation.DataValidation">
<em class="property">class </em><tt class="descclassname">roster_core.data_validation.</tt><tt class="descname">DataValidation</tt><big>(</big><em>reserved_words</em>, <em>group_permissions</em><big>)</big><a class="reference internal" href="_modules/roster_core/data_validation.html#DataValidation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.data_validation.DataValidation" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<dl class="method">
<dt id="roster_core.data_validation.DataValidation.ListGroupPermissions">
<tt class="descname">ListGroupPermissions</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/roster_core/data_validation.html#DataValidation.ListGroupPermissions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.data_validation.DataValidation.ListGroupPermissions" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a list of group permissions pulled from the database</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd>list: list of string group permissions</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.data_validation.DataValidation.ValidateRowDict">
<tt class="descname">ValidateRowDict</tt><big>(</big><em>table_name</em>, <em>row_dict</em>, <em>none_ok=False</em>, <em>all_none_ok=False</em><big>)</big><a class="reference internal" href="_modules/roster_core/data_validation.html#DataValidation.ValidateRowDict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.data_validation.DataValidation.ValidateRowDict" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Checks row dictionaries for correctness in reference to know data types</dt>
<dd>and column names in the coresponding table.</dd>
<dt>Input:</dt>
<dd>table_name: string of table name
row_dict: dict of row
none_ok: bool of allowance of None as a value in the dict
all_none_ok: bool of allowance of None as every value in the dict</dd>
<dt>Raises:</dt>
<dd>UnexpectedDataError: Missing key in dictionary
UnexpectedDataError: Dictionary has extra key that is not used.
FunctionError: No Function to check data type
UnexpectedDataError: Invalid data type
UnexpectedDataError: Need to fill out at least one value in dict</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.data_validation.DataValidation.isAccessLevel">
<tt class="descname">isAccessLevel</tt><big>(</big><em>access_level</em><big>)</big><a class="reference internal" href="_modules/roster_core/data_validation.html#DataValidation.isAccessLevel"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.data_validation.DataValidation.isAccessLevel" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks to make sure that the string is a valid access level.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>access_level: unisgned int that is in constants.ACCESS_LEVELS</dd>
<dt>Outputs:</dt>
<dd>bool: if access level is valid or not</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.data_validation.DataValidation.isCIDRBlock">
<tt class="descname">isCIDRBlock</tt><big>(</big><em>cidr_block</em><big>)</big><a class="reference internal" href="_modules/roster_core/data_validation.html#DataValidation.isCIDRBlock"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.data_validation.DataValidation.isCIDRBlock" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks that a string is a CIDR block.</p>
<p><a class="reference external" href="http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing">http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing</a></p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>cidr_block: string of CIDR block</dd>
<dt>Outputs:</dt>
<dd>bool: if it is valid CIDR block</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.data_validation.DataValidation.isDateTime">
<tt class="descname">isDateTime</tt><big>(</big><em>date_time</em><big>)</big><a class="reference internal" href="_modules/roster_core/data_validation.html#DataValidation.isDateTime"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.data_validation.DataValidation.isDateTime" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks that is a unicode string and that is a valid time stamp.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>date_time: string of date in format YYYY-MM-DD HH:MM:SS</dd>
<dt>Outputs:</dt>
<dd>bool: if it is a valid date</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.data_validation.DataValidation.isGroupPermission">
<tt class="descname">isGroupPermission</tt><big>(</big><em>group_permission</em><big>)</big><a class="reference internal" href="_modules/roster_core/data_validation.html#DataValidation.isGroupPermission"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.data_validation.DataValidation.isGroupPermission" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks to make sure that the string is a valid group permission.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>group_permission: unicode string of a group permission</dd>
<dt>Outputs:</dt>
<dd>bool: if group permission is valid or not</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.data_validation.DataValidation.isHostname">
<tt class="descname">isHostname</tt><big>(</big><em>host_name</em><big>)</big><a class="reference internal" href="_modules/roster_core/data_validation.html#DataValidation.isHostname"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.data_validation.DataValidation.isHostname" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks that is a unicode string and that is properly dotted.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>host_name: string of properly dotted time stamp</dd>
<dt>Outputs:</dt>
<dd>bool: if it is a valid hostname</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.data_validation.DataValidation.isIPv4IPAddress">
<tt class="descname">isIPv4IPAddress</tt><big>(</big><em>ip_address</em><big>)</big><a class="reference internal" href="_modules/roster_core/data_validation.html#DataValidation.isIPv4IPAddress"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.data_validation.DataValidation.isIPv4IPAddress" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks that a string is an ipv4 IP Address.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>ip_address: string of an ipv4 ip address</dd>
<dt>Outputs:</dt>
<dd>bool: if string is valid ip address</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.data_validation.DataValidation.isIPv6IPAddress">
<tt class="descname">isIPv6IPAddress</tt><big>(</big><em>ip_address</em><big>)</big><a class="reference internal" href="_modules/roster_core/data_validation.html#DataValidation.isIPv6IPAddress"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.data_validation.DataValidation.isIPv6IPAddress" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks that a string is a fully enumerated ipv6 IP Address.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>ip_address: string of ipv6 ip address</dd>
<dt>Outputs:</dt>
<dd>bool: if string is valid ip address</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.data_validation.DataValidation.isIntBool">
<tt class="descname">isIntBool</tt><big>(</big><em>int_bool</em><big>)</big><a class="reference internal" href="_modules/roster_core/data_validation.html#DataValidation.isIntBool"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.data_validation.DataValidation.isIntBool" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks that int_bool is only 1 or 0 and nothing else.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>int_bool: 1 or 0</dd>
<dt>Outputs:</dt>
<dd>bool: if it is a valid int bool</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.data_validation.DataValidation.isPickleString">
<tt class="descname">isPickleString</tt><big>(</big><em>pickle_string</em><big>)</big><a class="reference internal" href="_modules/roster_core/data_validation.html#DataValidation.isPickleString"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.data_validation.DataValidation.isPickleString" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks that the string can be unpickled.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>pickle_string: string to be unpickled.</dd>
<dt>Outputs:</dt>
<dd>bool: if it is a valid pickle string</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.data_validation.DataValidation.isReservedWord">
<tt class="descname">isReservedWord</tt><big>(</big><em>u_string</em><big>)</big><a class="reference internal" href="_modules/roster_core/data_validation.html#DataValidation.isReservedWord"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.data_validation.DataValidation.isReservedWord" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks that a string is unicode. Ignores reserved words.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>u_string: unicode string</dd>
<dt>Outputs:</dt>
<dd>bool: bool if string or not</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.data_validation.DataValidation.isTarget">
<tt class="descname">isTarget</tt><big>(</big><em>target</em><big>)</big><a class="reference internal" href="_modules/roster_core/data_validation.html#DataValidation.isTarget"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.data_validation.DataValidation.isTarget" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks that a target and it&#8217;s components have the correct length</p>
<p>Inputs:
target: target string</p>
<p>Outputs:
bool: if it is a valid target</p>
</dd></dl>

<dl class="method">
<dt id="roster_core.data_validation.DataValidation.isUnicodeString">
<tt class="descname">isUnicodeString</tt><big>(</big><em>u_string</em><big>)</big><a class="reference internal" href="_modules/roster_core/data_validation.html#DataValidation.isUnicodeString"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.data_validation.DataValidation.isUnicodeString" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks that a string is unicode.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>u_string: unicode string</dd>
<dt>Raises:</dt>
<dd>ReservedWordError: Reserved word found, unable to complete request.</dd>
<dt>Outputs:</dt>
<dd>bool: bool if string or not</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.data_validation.DataValidation.isUnicodeString255">
<tt class="descname">isUnicodeString255</tt><big>(</big><em>string</em><big>)</big><a class="reference internal" href="_modules/roster_core/data_validation.html#DataValidation.isUnicodeString255"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.data_validation.DataValidation.isUnicodeString255" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks that is a unicode string and that is less than 256 characters
long</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>string: string to validate</dd>
<dt>Outputs:</dt>
<dd>bool: if it is a valid unicode string of correct length</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.data_validation.DataValidation.isUnicodeStringNoSpaces">
<tt class="descname">isUnicodeStringNoSpaces</tt><big>(</big><em>string</em><big>)</big><a class="reference internal" href="_modules/roster_core/data_validation.html#DataValidation.isUnicodeStringNoSpaces"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.data_validation.DataValidation.isUnicodeStringNoSpaces" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks that string is unicode and contains no spaces</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>string: string to validate</dd>
<dt>Outputs:</dt>
<dd>bool: if it is a valid unicode string with no spaces</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.data_validation.DataValidation.isUnixDirectory">
<tt class="descname">isUnixDirectory</tt><big>(</big><em>directoryString</em><big>)</big><a class="reference internal" href="_modules/roster_core/data_validation.html#DataValidation.isUnixDirectory"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.data_validation.DataValidation.isUnixDirectory" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks a unicode string for valid Unix directory format.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>string: string to be checked</dd>
<dt>Outpus:</dt>
<dd>bool: if it is a valid Unix directory format</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.data_validation.DataValidation.isUnsignedInt">
<tt class="descname">isUnsignedInt</tt><big>(</big><em>unsigned_int</em><big>)</big><a class="reference internal" href="_modules/roster_core/data_validation.html#DataValidation.isUnsignedInt"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.data_validation.DataValidation.isUnsignedInt" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks that unsigned_int is of int class and is 0 or higher.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>unsigned_int: integer</dd>
<dt>Outputs:</dt>
<dd>bool: if it is a valid unsigned int</dd>
</dl>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-roster_core.db_access">
<span id="db-access-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">db_access</span></tt> Module<a class="headerlink" href="#module-roster_core.db_access" title="Permalink to this headline">¶</a></h2>
<p>This module is an API to access the dnsManagement database.</p>
<p>This module should only be run by servers with authentication layers
that are active. This module does not include authentication, but does
include authorization.</p>
<p>The api that will be exposed by this module is meant for use in a web
application or rpc server. This module is not for use in command line tools.</p>
<p>The two primary uses of this class are: 
1. to use convience functions to get large amounts of data out of the db</p>
<blockquote>
<div>without large amounts of db queries. For usage on this consult the pydoc
on the individual functions.</div></blockquote>
<ol class="arabic simple" start="2">
<li>to Make/Remove/List rows in the database. The method that is used in this</li>
</ol>
<blockquote>
<div><p>class is based on generic Make/Remove/Lock functions that take specifc
dictionaries that correspond to the table that is being referenced.</p>
<p>Here is an example of how to remove rows from the acls table:</p>
<p>acls_dict = db_instance.GetEmptyRowDict(&#8216;acls&#8217;)
acls_dict[&#8216;acl_name&#8217;] = &#8216;test_acl&#8217;
db_instance.StartTransaction()
try:</p>
<blockquote>
<div><p>matching_rows = db_instance.ListRow(&#8216;acls&#8217;, acls_dict)
for row in matching_rows:</p>
<blockquote>
<div>db_instance.RemoveRow(&#8216;acls&#8217;, row)</div></blockquote>
</div></blockquote>
<dl class="docutils">
<dt>except Exception:</dt>
<dd>db_instance.EndTransaction(rollback=True)</dd>
<dt>else:</dt>
<dd>db_instance.EndTransaction()</dd>
</dl>
</div></blockquote>
<dl class="docutils">
<dt>Note: MySQLdb.Error can be raised in almost any function in this module. Please</dt>
<dd>keep that in mind when using this module.</dd>
</dl>
<dl class="class">
<dt id="roster_core.db_access.dbAccess">
<em class="property">class </em><tt class="descclassname">roster_core.db_access.</tt><tt class="descname">dbAccess</tt><big>(</big><em>db_host</em>, <em>db_user</em>, <em>db_passwd</em>, <em>db_name</em>, <em>big_lock_timeout</em>, <em>big_lock_wait</em>, <em>thread_safe=True</em>, <em>ssl=False</em>, <em>ssl_ca=None</em>, <em>ssl_cert=None</em>, <em>ssl_key=None</em>, <em>ssl_capath=None</em>, <em>ssl_cipher=None</em>, <em>db_debug=False</em>, <em>db_debug_log=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/db_access.html#dbAccess"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.db_access.dbAccess" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>This class provides the primary interface for connecting and interacting
with the roster database.</p>
<dl class="method">
<dt id="roster_core.db_access.dbAccess.CheckMaintenanceFlag">
<tt class="descname">CheckMaintenanceFlag</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/roster_core/db_access.html#dbAccess.CheckMaintenanceFlag"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.db_access.dbAccess.CheckMaintenanceFlag" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks the maintenance flag in the database.</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd>bool: boolean of maintenance mode</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.db_access.dbAccess.CreateRosterDatabase">
<tt class="descname">CreateRosterDatabase</tt><big>(</big><em>schema=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/db_access.html#dbAccess.CreateRosterDatabase"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.db_access.dbAccess.CreateRosterDatabase" title="Permalink to this definition">¶</a></dt>
<dd><p>Destroys existing table structure in database and replaces it
with schema that is passed in(or default schema).</p>
<p>DO NOT RUN THIS AGAINST A DATABASE THAT IS NOT READY TO BE CLEARED</p>
<p>This function is used because of a poorly understood bug in MySQLdb
that does not allow our schema to be executed as one big query. The 
work around is splitting the whole thing up and commiting each piece
separately.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>schema: string of sql schema</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.db_access.dbAccess.DumpDatabase">
<tt class="descname">DumpDatabase</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/roster_core/db_access.html#dbAccess.DumpDatabase"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.db_access.dbAccess.DumpDatabase" title="Permalink to this definition">¶</a></dt>
<dd><p>This will dump the entire database to memory.</p>
<p>This would be done by mysqldump but it needs to be done in the same lock
as other processes. So this is a simple mysqldump function.</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>Dictionary: Dictionary with keys of table name and schema/data for each</dt>
<dd>table as values.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.db_access.dbAccess.EndTransaction">
<tt class="descname">EndTransaction</tt><big>(</big><em>rollback=False</em><big>)</big><a class="reference internal" href="_modules/roster_core/db_access.html#dbAccess.EndTransaction"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.db_access.dbAccess.EndTransaction" title="Permalink to this definition">¶</a></dt>
<dd><p>Ends a transaction.</p>
<p>Also does some simple checking to make sure a connection was open first
and releases itself from the current queue.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>rollback: boolean of if the transaction should be rolled back</dd>
<dt>Raises:</dt>
<dd>TransactionError: Must run StartTansaction before EndTransaction.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.db_access.dbAccess.GetCurrentTime">
<tt class="descname">GetCurrentTime</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/roster_core/db_access.html#dbAccess.GetCurrentTime"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.db_access.dbAccess.GetCurrentTime" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns datetime object of current time in database.</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd>datetime: current time in the database</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.db_access.dbAccess.GetEmptyRecordArgsDict">
<tt class="descname">GetEmptyRecordArgsDict</tt><big>(</big><em>record_type</em><big>)</big><a class="reference internal" href="_modules/roster_core/db_access.html#dbAccess.GetEmptyRecordArgsDict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.db_access.dbAccess.GetEmptyRecordArgsDict" title="Permalink to this definition">¶</a></dt>
<dd><p>Gets empty args dict for a specific record type</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>record_type: string of record type</dd>
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>dictionary: keyed by argument name with values of None</dt>
<dd><dl class="first last docutils">
<dt>example: {&#8216;mail_host&#8217;: None</dt>
<dd>&#8216;priority&#8217;: None}</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.db_access.dbAccess.GetEmptyRowDict">
<tt class="descname">GetEmptyRowDict</tt><big>(</big><em>table_name</em><big>)</big><a class="reference internal" href="_modules/roster_core/db_access.html#dbAccess.GetEmptyRowDict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.db_access.dbAccess.GetEmptyRowDict" title="Permalink to this definition">¶</a></dt>
<dd><p>Gives a dict that has all the members needed to interact with the
the given table using the Make/Remove/ListRow functions.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>table_name: string of valid table name from constants</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: Table name not valid</dd>
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>dictionary: of empty row for specificed table.</dt>
<dd><p class="first">example acls dict:
{&#8216;acl_name&#8217;: None</p>
<blockquote class="last">
<div>&#8216;acl_range_allowed: None,
&#8216;acl_cidr_block&#8217;: None }</div></blockquote>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.db_access.dbAccess.GetRecordArgsDict">
<tt class="descname">GetRecordArgsDict</tt><big>(</big><em>record_type</em><big>)</big><a class="reference internal" href="_modules/roster_core/db_access.html#dbAccess.GetRecordArgsDict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.db_access.dbAccess.GetRecordArgsDict" title="Permalink to this definition">¶</a></dt>
<dd><p>Get args for a specific record type from the db and shove them into
a dictionary.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>record_type: string of record type</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: Unknown record type</dd>
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>dictionary: keyed by argument name with values of data type of that arg</dt>
<dd><dl class="first last docutils">
<dt>example: {&#8216;mail_host&#8217;: &#8216;Hostname&#8217;</dt>
<dd>&#8216;priority&#8217;: &#8216;UnsignedInt&#8217;}</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.db_access.dbAccess.GetUserAuthorizationInfo">
<tt class="descname">GetUserAuthorizationInfo</tt><big>(</big><em>user</em><big>)</big><a class="reference internal" href="_modules/roster_core/db_access.html#dbAccess.GetUserAuthorizationInfo"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.db_access.dbAccess.GetUserAuthorizationInfo" title="Permalink to this definition">¶</a></dt>
<dd><p>Grabs authorization data from the db and returns a dict.</p>
<p>This function does two selects on the db, one for forward and one for
reverse zones. It also parses the data into a dict for ease of use.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>user: string of username</dd>
<dt>Raises:</dt>
<dd><dl class="first last docutils">
<dt>UnexpectedDataError: Row did not contain</dt>
<dd>reverse_range_permissions or
forward_zone_permissions</dd>
</dl>
</dd>
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>dict: dict with all the relevant information</dt>
<dd><p class="first">example:
{&#8216;user_access_level&#8217;: &#8216;2&#8217;,</p>
<blockquote class="last">
<div><p>&#8216;user_name&#8217;: &#8216;shuey&#8217;,
&#8216;forward_zones&#8217;: [</p>
<blockquote>
<div><dl class="docutils">
<dt>{&#8216;zone_name&#8217;: &#8216;cs.university.edu&#8217;,</dt>
<dd>&#8216;group_permission&#8217;: [&#8216;a&#8217;, &#8216;aaaa&#8217;]},</dd>
<dt>{&#8216;zone_name&#8217;: &#8216;eas.university.edu&#8217;,</dt>
<dd>&#8216;group_permission&#8217;: [&#8216;a&#8217;, &#8216;aaaa&#8217;, &#8216;cname&#8217;]},</dd>
<dt>{&#8216;zone_name&#8217;: &#8216;bio.university.edu&#8217;,</dt>
<dd>&#8216;group_permission&#8217;: &#8216;&#8217;a&#8217;, &#8216;ns&#8217;}],</dd>
</dl>
</div></blockquote>
<p>&#8216;groups&#8217;: [&#8216;cs&#8217;, &#8216;bio&#8217;],
&#8216;reverse_ranges&#8217;: [</p>
<blockquote>
<div><dl class="docutils">
<dt>{&#8216;cidr_block&#8217;: &#8216;192.168.0.0/24&#8217;,</dt>
<dd>&#8216;group_permission&#8217;: [&#8216;ptr&#8217;, &#8216;cname&#8217;]},</dd>
<dt>{&#8216;cidr_block&#8217;: &#8216;192.168.0.0/24&#8217;,</dt>
<dd>&#8216;group_permission&#8217;: [&#8216;ptr&#8217;]},</dd>
<dt>{&#8216;cidr_block&#8217;: &#8216;192.168.1.0/24&#8217;,</dt>
<dd>&#8216;group_permission&#8217;: [&#8216;ptr&#8217;, &#8216;cname&#8217;]}]}</dd>
</dl>
</div></blockquote>
</div></blockquote>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.db_access.dbAccess.GetValidTables">
<tt class="descname">GetValidTables</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/roster_core/db_access.html#dbAccess.GetValidTables"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.db_access.dbAccess.GetValidTables" title="Permalink to this definition">¶</a></dt>
<dd><p>Export this function to the top level of the db_access stuff so
it can be used without importing un-needed classes.</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd>list: valid table names</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.db_access.dbAccess.GetZoneOrigins">
<tt class="descname">GetZoneOrigins</tt><big>(</big><em>zone_name</em>, <em>view_name</em><big>)</big><a class="reference internal" href="_modules/roster_core/db_access.html#dbAccess.GetZoneOrigins"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.db_access.dbAccess.GetZoneOrigins" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns zone origins of zone_name that is passed in.
If no zone origins are found, return None.
If None is passed for view_name the output may contain multiple origins
per zone name.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>zone_name: string of zone_name
view_name: string of view_name or None</dd>
<dt>Outputs:</dt>
<dd><p class="first">a dictionary keyed by zone name with values of lists of origins
Example:</p>
<blockquote class="last">
<div><dl class="docutils">
<dt>{&#8216;test_zone&#8217;: [&#8216;192.168.0.in-addr.arpa.&#8217;, &#8216;10.0.1.in-addr.arpa.&#8217;],</dt>
<dd>&#8216;example_rev&#8217;: [&#8216;10.0.in-addr.arpa.&#8217;]}</dd>
</dl>
</div></blockquote>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.db_access.dbAccess.InitDataValidation">
<tt class="descname">InitDataValidation</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/roster_core/db_access.html#dbAccess.InitDataValidation"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.db_access.dbAccess.InitDataValidation" title="Permalink to this definition">¶</a></dt>
<dd><p>Get all reserved words and group permissions and init the
data_validation_instance</p>
</dd></dl>

<dl class="method">
<dt id="roster_core.db_access.dbAccess.ListRow">
<tt class="descname">ListRow</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="_modules/roster_core/db_access.html#dbAccess.ListRow"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.db_access.dbAccess.ListRow" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists rows in the database using a dictionary of tables. Then returns 
the rows found. Joins are auto generated on the fly based on foreign keys
in the database.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd><p class="first">args: pairs of string of table name and dict of rows
kwargs: lock_rows: default False</p>
<blockquote>
<div><dl class="docutils">
<dt>column: column to search range on, if using multiple</dt>
<dd>tables, the column must be in the first table
in args.</dd>
</dl>
<p>range_values: range tuple of values to search within for on column
is_date: boolean of if range is of dates</p>
</div></blockquote>
<dl class="last docutils">
<dt>example usage: ListRow(&#8216;users&#8217;, user_row_dict,</dt>
<dd>&#8216;user_group_assignments&#8217;, user_assign_row_dict,
lock_rows=True)</dd>
</dl>
</dd>
<dt>Raises:</dt>
<dd><p class="first">TransactionError: Must run StartTansaction before inserting
UnexpectedDataError: If is_date is specified you must specify column and range
UnexpectedDataError: If column or range is specified both are needed
InvalidInputError: Found unknown option(s)
UnexpectedDataError: No args given, must at least have a pair of table name and row dict
UnexpectedDataError: Number of unnamed args is not even.</p>
<blockquote>
<div>Args should be entered in pairs of table name and row dict.</div></blockquote>
<p class="last">InvalidInputError: Table name not valid
InvalidInputError: Column not found in row
UnexpectedDataError: Column in table is not a DateTime type
UnexpectedDataError: Date from range is not a valid datetime object
InvalidInputError: Range must be int if is_date is not set
InvalidInputError: Multiple tables were passed in but no joins were found</p>
</dd>
<dt>Outputs:</dt>
<dd><p class="first">tuple of row dicts consisting of all the tables that were in the input.
all column names in the db are unique so no colisions occour</p>
<blockquote class="last">
<div><dl class="docutils">
<dt>example: ({&#8216;user_name&#8217;: &#8216;sharrell&#8217;, &#8216;access_level&#8217;: 10, </dt>
<dd><blockquote class="first">
<div>&#8216;user_group_assignments_group_name: &#8216;cs&#8217;,
&#8216;user_group_assignments_user_name: &#8216;sharrell&#8217;},</div></blockquote>
<dl class="last docutils">
<dt>{&#8216;user_name&#8217;: &#8216;sharrell&#8217;, &#8216;access_level&#8217;: 10, </dt>
<dd>&#8216;user_group_assignments_group_name: &#8216;eas&#8217;,
&#8216;user_group_assignments_user_name: &#8216;sharrell&#8217;})</dd>
</dl>
</dd>
</dl>
</div></blockquote>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.db_access.dbAccess.ListTableNames">
<tt class="descname">ListTableNames</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/roster_core/db_access.html#dbAccess.ListTableNames"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.db_access.dbAccess.ListTableNames" title="Permalink to this definition">¶</a></dt>
<dd><p>Lists all tables in the database.</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd>List: List of tables</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.db_access.dbAccess.LockDb">
<tt class="descname">LockDb</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/roster_core/db_access.html#dbAccess.LockDb"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.db_access.dbAccess.LockDb" title="Permalink to this definition">¶</a></dt>
<dd><p>This function is to lock the whole database for consistent data
retrevial.</p>
<p>This function expects for self.db_instance.cursor to be instantiated and
valid.</p>
<dl class="docutils">
<dt>Raises: </dt>
<dd>TransactionError: Must unlock tables before re-locking them.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.db_access.dbAccess.MakeRow">
<tt class="descname">MakeRow</tt><big>(</big><em>table_name</em>, <em>row_dict</em><big>)</big><a class="reference internal" href="_modules/roster_core/db_access.html#dbAccess.MakeRow"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.db_access.dbAccess.MakeRow" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a row in the database using the table name and row dict</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>table_name: string of valid table name from constants
row_dict: dictionary that coresponds to table_name</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: Table name not valid
TransactionError: Must run StartTansaction before inserting</dd>
<dt>Outputs:</dt>
<dd>int: last insert id</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.db_access.dbAccess.RemoveRow">
<tt class="descname">RemoveRow</tt><big>(</big><em>table_name</em>, <em>row_dict</em><big>)</big><a class="reference internal" href="_modules/roster_core/db_access.html#dbAccess.RemoveRow"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.db_access.dbAccess.RemoveRow" title="Permalink to this definition">¶</a></dt>
<dd><p>Removes a row in the database using the table name and row dict</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>table_name: string of valid table name from constants
row_dict: dictionary that coresponds to table_name</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: Table name not valid
TransactionError: Must run StartTansaction before deleting</dd>
<dt>Outputs:</dt>
<dd>int: number of rows affected</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.db_access.dbAccess.StartTransaction">
<tt class="descname">StartTransaction</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/roster_core/db_access.html#dbAccess.StartTransaction"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.db_access.dbAccess.StartTransaction" title="Permalink to this definition">¶</a></dt>
<dd><p>Starts a transaction.</p>
<p>Also it starts a db connection if none exists or it times out.
Always creates a new cursor.</p>
<p>This function also serializes all requests on this object and if the 
big lock has been activated will wait for it to be released.</p>
<dl class="docutils">
<dt>Raises:</dt>
<dd><dl class="first last docutils">
<dt>TransactionError: Cannot start new transaction last transaction not</dt>
<dd>committed or rolled-back.</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.db_access.dbAccess.TableRowCount">
<tt class="descname">TableRowCount</tt><big>(</big><em>table_name</em><big>)</big><a class="reference internal" href="_modules/roster_core/db_access.html#dbAccess.TableRowCount"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.db_access.dbAccess.TableRowCount" title="Permalink to this definition">¶</a></dt>
<dd><p>Counts the amount of records in a table and returns it.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>table_name: string of valid table name from constants</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: Table name not valid
TransactionError: Must run StartTansaction before getting row count.</dd>
<dt>Outputs:</dt>
<dd>int: number of rows found</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.db_access.dbAccess.UnlockDb">
<tt class="descname">UnlockDb</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/roster_core/db_access.html#dbAccess.UnlockDb"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.db_access.dbAccess.UnlockDb" title="Permalink to this definition">¶</a></dt>
<dd><p>This function is to unlock the whole database.</p>
<p>This function expects for self.db_instance.cursor to be instantiated and
valid. It also expects all tables to be locked.</p>
<dl class="docutils">
<dt>Raises:</dt>
<dd>TransactionError: Must lock tables before unlocking them.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.db_access.dbAccess.UpdateRow">
<tt class="descname">UpdateRow</tt><big>(</big><em>table_name</em>, <em>search_row_dict</em>, <em>update_row_dict</em><big>)</big><a class="reference internal" href="_modules/roster_core/db_access.html#dbAccess.UpdateRow"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.db_access.dbAccess.UpdateRow" title="Permalink to this definition">¶</a></dt>
<dd><p>Updates a row in the database using search and update dictionaries.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd><p class="first">table_name: string of valid table name from constants
search_row_dict: dictionary that coresponds to table_name containing</p>
<blockquote>
<div>search args</div></blockquote>
<dl class="last docutils">
<dt>update_row_dict: dictionary that coresponds to table_name containing</dt>
<dd>update args</dd>
</dl>
</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: Table name not valid
TransactionError: Must run StartTansaction before inserting</dd>
<dt>Outputs:</dt>
<dd>int: number of rows affected</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.db_access.dbAccess.ValidateRecordArgsDict">
<tt class="descname">ValidateRecordArgsDict</tt><big>(</big><em>record_type</em>, <em>record_args_dict</em>, <em>none_ok=False</em><big>)</big><a class="reference internal" href="_modules/roster_core/db_access.html#dbAccess.ValidateRecordArgsDict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.db_access.dbAccess.ValidateRecordArgsDict" title="Permalink to this definition">¶</a></dt>
<dd><p>Type checks record args dynamically.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd><p class="first">record_type: string of record_type
record_args_dict: dictionary for args keyed by arg name.</p>
<blockquote>
<div>a filled out dict from GetEmptyRecordArgsDict()</div></blockquote>
<p class="last">none_ok: boolean of if None types should be acepted.</p>
</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: dict for record type should have these keys
FucntionError: No function to check data type
UnexpectedDataError: Invalid data type</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.db_access.dbAccess.close">
<tt class="descname">close</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/roster_core/db_access.html#dbAccess.close"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.db_access.dbAccess.close" title="Permalink to this definition">¶</a></dt>
<dd><p>Closes a connection that has been opened.</p>
<p>A new connection will be created on StartTransaction.</p>
</dd></dl>

<dl class="method">
<dt id="roster_core.db_access.dbAccess.cursor_execute">
<tt class="descname">cursor_execute</tt><big>(</big><em>execution_string</em>, <em>values={}</em><big>)</big><a class="reference internal" href="_modules/roster_core/db_access.html#dbAccess.cursor_execute"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.db_access.dbAccess.cursor_execute" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>This function allows for the capture of every mysql command that</dt>
<dd>is run in this class.</dd>
<dt>Inputs:</dt>
<dd>execution_string: mysql command string
values: dictionary of values for mysql command</dd>
</dl>
</dd></dl>

</dd></dl>

</div>
<div class="section" id="module-roster_core.embedded_files">
<span id="embedded-files-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">embedded_files</span></tt> Module<a class="headerlink" href="#module-roster_core.embedded_files" title="Permalink to this headline">¶</a></h2>
</div>
<div class="section" id="module-roster_core.errors">
<span id="errors-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">errors</span></tt> Module<a class="headerlink" href="#module-roster_core.errors" title="Permalink to this headline">¶</a></h2>
<p>Central collection of base error classes in the RosterCore.</p>
<dl class="exception">
<dt id="roster_core.errors.AuthenticationError">
<em class="property">exception </em><tt class="descclassname">roster_core.errors.</tt><tt class="descname">AuthenticationError</tt><a class="reference internal" href="_modules/roster_core/errors.html#AuthenticationError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.errors.AuthenticationError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#roster_core.errors.UserError" title="roster_core.errors.UserError"><tt class="xref py py-class docutils literal"><span class="pre">roster_core.errors.UserError</span></tt></a></p>
</dd></dl>

<dl class="exception">
<dt id="roster_core.errors.AuthorizationError">
<em class="property">exception </em><tt class="descclassname">roster_core.errors.</tt><tt class="descname">AuthorizationError</tt><a class="reference internal" href="_modules/roster_core/errors.html#AuthorizationError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.errors.AuthorizationError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#roster_core.errors.UserError" title="roster_core.errors.UserError"><tt class="xref py py-class docutils literal"><span class="pre">roster_core.errors.UserError</span></tt></a></p>
</dd></dl>

<dl class="exception">
<dt id="roster_core.errors.ConfigError">
<em class="property">exception </em><tt class="descclassname">roster_core.errors.</tt><tt class="descname">ConfigError</tt><a class="reference internal" href="_modules/roster_core/errors.html#ConfigError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.errors.ConfigError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#roster_core.errors.UserError" title="roster_core.errors.UserError"><tt class="xref py py-class docutils literal"><span class="pre">roster_core.errors.UserError</span></tt></a></p>
</dd></dl>

<dl class="exception">
<dt id="roster_core.errors.CoreError">
<em class="property">exception </em><tt class="descclassname">roster_core.errors.</tt><tt class="descname">CoreError</tt><a class="reference internal" href="_modules/roster_core/errors.html#CoreError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.errors.CoreError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">exceptions.Exception</span></tt></p>
<p>Error class that all Roster errors are 
sub-classed from</p>
</dd></dl>

<dl class="exception">
<dt id="roster_core.errors.DatabaseError">
<em class="property">exception </em><tt class="descclassname">roster_core.errors.</tt><tt class="descname">DatabaseError</tt><big>(</big><em>value</em><big>)</big><a class="reference internal" href="_modules/roster_core/errors.html#DatabaseError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.errors.DatabaseError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#roster_core.errors.UserError" title="roster_core.errors.UserError"><tt class="xref py py-class docutils literal"><span class="pre">roster_core.errors.UserError</span></tt></a></p>
<p>Raised when DatabaseError is raised and changes its value
to be more readable</p>
</dd></dl>

<dl class="exception">
<dt id="roster_core.errors.DbAccessError">
<em class="property">exception </em><tt class="descclassname">roster_core.errors.</tt><tt class="descname">DbAccessError</tt><a class="reference internal" href="_modules/roster_core/errors.html#DbAccessError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.errors.DbAccessError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#roster_core.errors.InternalError" title="roster_core.errors.InternalError"><tt class="xref py py-class docutils literal"><span class="pre">roster_core.errors.InternalError</span></tt></a></p>
</dd></dl>

<dl class="exception">
<dt id="roster_core.errors.FunctionError">
<em class="property">exception </em><tt class="descclassname">roster_core.errors.</tt><tt class="descname">FunctionError</tt><a class="reference internal" href="_modules/roster_core/errors.html#FunctionError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.errors.FunctionError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#roster_core.errors.InternalError" title="roster_core.errors.InternalError"><tt class="xref py py-class docutils literal"><span class="pre">roster_core.errors.InternalError</span></tt></a></p>
</dd></dl>

<dl class="exception">
<dt id="roster_core.errors.IPIndexError">
<em class="property">exception </em><tt class="descclassname">roster_core.errors.</tt><tt class="descname">IPIndexError</tt><a class="reference internal" href="_modules/roster_core/errors.html#IPIndexError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.errors.IPIndexError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#roster_core.errors.InternalError" title="roster_core.errors.InternalError"><tt class="xref py py-class docutils literal"><span class="pre">roster_core.errors.InternalError</span></tt></a></p>
</dd></dl>

<dl class="exception">
<dt id="roster_core.errors.InternalError">
<em class="property">exception </em><tt class="descclassname">roster_core.errors.</tt><tt class="descname">InternalError</tt><a class="reference internal" href="_modules/roster_core/errors.html#InternalError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.errors.InternalError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#roster_core.errors.CoreError" title="roster_core.errors.CoreError"><tt class="xref py py-class docutils literal"><span class="pre">roster_core.errors.CoreError</span></tt></a></p>
<p>Error class that all internal/code errors
sub-class from.</p>
</dd></dl>

<dl class="exception">
<dt id="roster_core.errors.InvalidInputError">
<em class="property">exception </em><tt class="descclassname">roster_core.errors.</tt><tt class="descname">InvalidInputError</tt><a class="reference internal" href="_modules/roster_core/errors.html#InvalidInputError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.errors.InvalidInputError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#roster_core.errors.UserError" title="roster_core.errors.UserError"><tt class="xref py py-class docutils literal"><span class="pre">roster_core.errors.UserError</span></tt></a></p>
</dd></dl>

<dl class="exception">
<dt id="roster_core.errors.MaintenanceError">
<em class="property">exception </em><tt class="descclassname">roster_core.errors.</tt><tt class="descname">MaintenanceError</tt><a class="reference internal" href="_modules/roster_core/errors.html#MaintenanceError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.errors.MaintenanceError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#roster_core.errors.InternalError" title="roster_core.errors.InternalError"><tt class="xref py py-class docutils literal"><span class="pre">roster_core.errors.InternalError</span></tt></a></p>
</dd></dl>

<dl class="exception">
<dt id="roster_core.errors.MissingDataTypeError">
<em class="property">exception </em><tt class="descclassname">roster_core.errors.</tt><tt class="descname">MissingDataTypeError</tt><a class="reference internal" href="_modules/roster_core/errors.html#MissingDataTypeError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.errors.MissingDataTypeError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#roster_core.errors.DbAccessError" title="roster_core.errors.DbAccessError"><tt class="xref py py-class docutils literal"><span class="pre">roster_core.errors.DbAccessError</span></tt></a></p>
</dd></dl>

<dl class="exception">
<dt id="roster_core.errors.RecordError">
<em class="property">exception </em><tt class="descclassname">roster_core.errors.</tt><tt class="descname">RecordError</tt><a class="reference internal" href="_modules/roster_core/errors.html#RecordError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.errors.RecordError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#roster_core.errors.InternalError" title="roster_core.errors.InternalError"><tt class="xref py py-class docutils literal"><span class="pre">roster_core.errors.InternalError</span></tt></a></p>
</dd></dl>

<dl class="exception">
<dt id="roster_core.errors.RecordsBatchError">
<em class="property">exception </em><tt class="descclassname">roster_core.errors.</tt><tt class="descname">RecordsBatchError</tt><a class="reference internal" href="_modules/roster_core/errors.html#RecordsBatchError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.errors.RecordsBatchError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#roster_core.errors.InternalError" title="roster_core.errors.InternalError"><tt class="xref py py-class docutils literal"><span class="pre">roster_core.errors.InternalError</span></tt></a></p>
</dd></dl>

<dl class="exception">
<dt id="roster_core.errors.ReservedWordError">
<em class="property">exception </em><tt class="descclassname">roster_core.errors.</tt><tt class="descname">ReservedWordError</tt><a class="reference internal" href="_modules/roster_core/errors.html#ReservedWordError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.errors.ReservedWordError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#roster_core.errors.UserError" title="roster_core.errors.UserError"><tt class="xref py py-class docutils literal"><span class="pre">roster_core.errors.UserError</span></tt></a></p>
</dd></dl>

<dl class="exception">
<dt id="roster_core.errors.TransactionError">
<em class="property">exception </em><tt class="descclassname">roster_core.errors.</tt><tt class="descname">TransactionError</tt><a class="reference internal" href="_modules/roster_core/errors.html#TransactionError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.errors.TransactionError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#roster_core.errors.DbAccessError" title="roster_core.errors.DbAccessError"><tt class="xref py py-class docutils literal"><span class="pre">roster_core.errors.DbAccessError</span></tt></a></p>
</dd></dl>

<dl class="exception">
<dt id="roster_core.errors.UnexpectedDataError">
<em class="property">exception </em><tt class="descclassname">roster_core.errors.</tt><tt class="descname">UnexpectedDataError</tt><a class="reference internal" href="_modules/roster_core/errors.html#UnexpectedDataError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.errors.UnexpectedDataError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#roster_core.errors.UserError" title="roster_core.errors.UserError"><tt class="xref py py-class docutils literal"><span class="pre">roster_core.errors.UserError</span></tt></a></p>
</dd></dl>

<dl class="exception">
<dt id="roster_core.errors.UserError">
<em class="property">exception </em><tt class="descclassname">roster_core.errors.</tt><tt class="descname">UserError</tt><a class="reference internal" href="_modules/roster_core/errors.html#UserError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.errors.UserError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#roster_core.errors.CoreError" title="roster_core.errors.CoreError"><tt class="xref py py-class docutils literal"><span class="pre">roster_core.errors.CoreError</span></tt></a></p>
<p>Error class that all User errors
sub-class from.</p>
</dd></dl>

<dl class="exception">
<dt id="roster_core.errors.VersionDiscrepancyError">
<em class="property">exception </em><tt class="descclassname">roster_core.errors.</tt><tt class="descname">VersionDiscrepancyError</tt><a class="reference internal" href="_modules/roster_core/errors.html#VersionDiscrepancyError"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.errors.VersionDiscrepancyError" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#roster_core.errors.InternalError" title="roster_core.errors.InternalError"><tt class="xref py py-class docutils literal"><span class="pre">roster_core.errors.InternalError</span></tt></a></p>
</dd></dl>

</div>
<div class="section" id="module-roster_core.helpers_lib">
<span id="helpers-lib-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">helpers_lib</span></tt> Module<a class="headerlink" href="#module-roster_core.helpers_lib" title="Permalink to this headline">¶</a></h2>
<p>This is a library of static helper functions for Roster.</p>
<dl class="function">
<dt id="roster_core.helpers_lib.CIDRExpand">
<tt class="descclassname">roster_core.helpers_lib.</tt><tt class="descname">CIDRExpand</tt><big>(</big><em>cidr_block</em>, <em>begin=None</em>, <em>end=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/helpers_lib.html#CIDRExpand"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.helpers_lib.CIDRExpand" title="Permalink to this definition">¶</a></dt>
<dd><dl class="docutils">
<dt>Expands a cidr block to a list of ip addreses</dt>
<dd>from begin (integer) to end (integer).</dd>
<dt>Inputs:</dt>
<dd>cidr_block: string of cidr_block
begin: integer of ip address to start
end: integer of ip address to end</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: Not a valid CIDR block.</dd>
<dt>Outputs:</dt>
<dd>list: list of ip addresses in strings</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="roster_core.helpers_lib.CreateRecordsFromZoneObject">
<tt class="descclassname">roster_core.helpers_lib.</tt><tt class="descname">CreateRecordsFromZoneObject</tt><big>(</big><em>zone_object</em>, <em>zone_name=None</em>, <em>view_name=None</em>, <em>zone_origin=None</em>, <em>views_list=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/helpers_lib.html#CreateRecordsFromZoneObject"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.helpers_lib.CreateRecordsFromZoneObject" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a list of record dictionaries from a dns.zone object</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd><p class="first">zone_object: a dns.zone object
zone_origin: a string of the zone origin
zone_name: string of zone name
view_name: string of view name
views_list: list of view dictionaries.</p>
<blockquote class="last">
<div>Note: This is only necessary if being called by AddFormattedRecords.</div></blockquote>
</dd>
<dt>Output:</dt>
<dd>make_record_args_list: list of dictionaries of records</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="roster_core.helpers_lib.ExpandIPV6">
<tt class="descclassname">roster_core.helpers_lib.</tt><tt class="descname">ExpandIPV6</tt><big>(</big><em>ip_address</em><big>)</big><a class="reference internal" href="_modules/roster_core/helpers_lib.html#ExpandIPV6"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.helpers_lib.ExpandIPV6" title="Permalink to this definition">¶</a></dt>
<dd><p>Expands a shorthand ipv6 address to a full ipv6 address</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>ip_address: string of short ipv6 address</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: Not a valid IP address.
InvalidInputError: Not a valid IPV6 address.</dd>
<dt>Outputs:</dt>
<dd>string: string of long ipv6 address</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="roster_core.helpers_lib.FixHostname">
<tt class="descclassname">roster_core.helpers_lib.</tt><tt class="descname">FixHostname</tt><big>(</big><em>host_name</em>, <em>origin</em><big>)</big><a class="reference internal" href="_modules/roster_core/helpers_lib.html#FixHostname"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.helpers_lib.FixHostname" title="Permalink to this definition">¶</a></dt>
<dd><p>Checks name and returns fqdn.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>host_name: string of host name
origin: string of the zone origin</dd>
<dt>Outputs:</dt>
<dd>string of fully qualified domain name</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="roster_core.helpers_lib.GetFunctionNameAndArgs">
<tt class="descclassname">roster_core.helpers_lib.</tt><tt class="descname">GetFunctionNameAndArgs</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/roster_core/helpers_lib.html#GetFunctionNameAndArgs"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.helpers_lib.GetFunctionNameAndArgs" title="Permalink to this definition">¶</a></dt>
<dd><p>Grabs the current frame and adjacent frames then finds the calling
function name and arguments and returns them.</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>tuple: function name and current args</dt>
<dd><dl class="first last docutils">
<dt>ex: (&#8216;MakeUser&#8217;, {&#8216;replay_args&#8217;: [u&#8217;ahoward&#8217;, 64],</dt>
<dd><dl class="first last docutils">
<dt>&#8216;audit_args&#8217;: {&#8216;access_level&#8217;: 64,</dt>
<dd>&#8216;user_name&#8217;: u&#8217;ahoward&#8217;}}</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="roster_core.helpers_lib.GetRecordsFromRecordRowsAndArgumentRows">
<tt class="descclassname">roster_core.helpers_lib.</tt><tt class="descname">GetRecordsFromRecordRowsAndArgumentRows</tt><big>(</big><em>record_data</em>, <em>record_args_dict</em><big>)</big><a class="reference internal" href="_modules/roster_core/helpers_lib.html#GetRecordsFromRecordRowsAndArgumentRows"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.helpers_lib.GetRecordsFromRecordRowsAndArgumentRows" title="Permalink to this definition">¶</a></dt>
<dd><p>Takes data from joined records and record_arguments_record_assignments
and creates record rows that are combined.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd><dl class="first last docutils">
<dt>record_data: List of rows from ListRow with records and</dt>
<dd>records_arguments_record_assignments joined.</dd>
</dl>
</dd>
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>list of record dictionaries</dt>
<dd><p class="first">Each dictionary can have different args depending on record type.
All of them will include record_type, target, zone_name, ttl, and
view_name regardless of record type. Below is an example of an mx
record search.
example: [{&#8216;record_type&#8217;: &#8216;mx&#8217;, &#8216;target&#8217;: &#8216;university.edu.&#8217;,</p>
<blockquote class="last">
<div><blockquote>
<div>&#8216;zone_name&#8217;: &#8216;university.edu&#8217;, ttl: 3600,
&#8216;view_name&#8217;: &#8216;external&#8217;, &#8216;priority&#8217;: 10,
&#8216;mail_server&#8217;: &#8216;smtp-01.university.edu.&#8217;,
&#8216;last_user&#8217;: &#8216;sharrell},</div></blockquote>
<dl class="docutils">
<dt>{&#8216;record_type&#8217;: &#8216;mx&#8217;, &#8216;target&#8217;: &#8216;university.edu.&#8217;,</dt>
<dd>&#8216;zone_name&#8217;: &#8216;university.edu&#8217;, ttl: 3600,
&#8216;view_name&#8217;: &#8216;external&#8217;, &#8216;priority&#8217;: 20,
&#8216;mail_server&#8217;: &#8216;smtp-02.university.edu.&#8217;},
&#8216;last_user&#8217;: &#8216;sharrell}]</dd>
</dl>
</div></blockquote>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="roster_core.helpers_lib.GetRowDict">
<tt class="descclassname">roster_core.helpers_lib.</tt><tt class="descname">GetRowDict</tt><big>(</big><em>table_name</em><big>)</big><a class="reference internal" href="_modules/roster_core/helpers_lib.html#GetRowDict"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.helpers_lib.GetRowDict" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a specific dictionary keyed off of table name.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>table_name: string of table name from db</dd>
<dt>Outputs:</dt>
<dd>dictionary: dict of row that was requested (see constants above)</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="roster_core.helpers_lib.GetValidTables">
<tt class="descclassname">roster_core.helpers_lib.</tt><tt class="descname">GetValidTables</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/roster_core/helpers_lib.html#GetValidTables"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.helpers_lib.GetValidTables" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns all of the tables in the database that are enumerated in this
modules.</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>list: list of valid tables.</dt>
<dd>example: [&#8216;acls&#8217;, &#8216;records&#8217;, &#8216;etc&#8217;]</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="roster_core.helpers_lib.ReverseIP">
<tt class="descclassname">roster_core.helpers_lib.</tt><tt class="descname">ReverseIP</tt><big>(</big><em>ip_address</em><big>)</big><a class="reference internal" href="_modules/roster_core/helpers_lib.html#ReverseIP"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.helpers_lib.ReverseIP" title="Permalink to this definition">¶</a></dt>
<dd><p>Reverse an IP address</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>ip_address: either an ipv4 or ipv6 string</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: Not a valid IP address.</dd>
<dt>Outputs:</dt>
<dd>string: reverse ip address</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="roster_core.helpers_lib.UnExpandIPV6">
<tt class="descclassname">roster_core.helpers_lib.</tt><tt class="descname">UnExpandIPV6</tt><big>(</big><em>ip_address</em><big>)</big><a class="reference internal" href="_modules/roster_core/helpers_lib.html#UnExpandIPV6"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.helpers_lib.UnExpandIPV6" title="Permalink to this definition">¶</a></dt>
<dd><p>Unexpands a full ipv6 address to a shorthand ipv6 address</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>ip_address: string of long ipv6 address</dd>
<dt>Raises:</dt>
<dd>InvalidInputError: Not a valid IP address.
InvalidInputError: Not a valid IPV6 address.</dd>
<dt>Outputs:</dt>
<dd>string: string of short ipv6 address</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="roster_core.helpers_lib.UnReverseIP">
<tt class="descclassname">roster_core.helpers_lib.</tt><tt class="descname">UnReverseIP</tt><big>(</big><em>ip_address</em><big>)</big><a class="reference internal" href="_modules/roster_core/helpers_lib.html#UnReverseIP"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.helpers_lib.UnReverseIP" title="Permalink to this definition">¶</a></dt>
<dd><p>Un-Reverses reversed IP addresses</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>ip_address: either an ipv4 or ipv6 string (reversed)</dd>
<dt>Outputs:</dt>
<dd>string: forward ip address</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="roster_core.helpers_lib.UnicodeString">
<tt class="descclassname">roster_core.helpers_lib.</tt><tt class="descname">UnicodeString</tt><big>(</big><em>string</em><big>)</big><a class="reference internal" href="_modules/roster_core/helpers_lib.html#UnicodeString"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.helpers_lib.UnicodeString" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns unicode string if object is a string</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>string: string to unicode</dd>
<dt>Outputs:</dt>
<dd>unicode string: if input is a string</dd>
</dl>
</dd></dl>

</div>
<div class="section" id="module-roster_core.punycode_lib">
<span id="punycode-lib-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">punycode_lib</span></tt> Module<a class="headerlink" href="#module-roster_core.punycode_lib" title="Permalink to this headline">¶</a></h2>
<p>Punycode and Unicode convertor module for Roster</p>
<dl class="function">
<dt id="roster_core.punycode_lib.Puny2Uni">
<tt class="descclassname">roster_core.punycode_lib.</tt><tt class="descname">Puny2Uni</tt><big>(</big><em>punycode_string=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/punycode_lib.html#Puny2Uni"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.punycode_lib.Puny2Uni" title="Permalink to this definition">¶</a></dt>
<dd><p>Converts a Punycoded domain into a unicode domain.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>string: Punycoded domain.</dd>
<dt>Outputs:</dt>
<dd>unicode: Decoded punycode domain.</dd>
</dl>
</dd></dl>

<dl class="function">
<dt id="roster_core.punycode_lib.Uni2Puny">
<tt class="descclassname">roster_core.punycode_lib.</tt><tt class="descname">Uni2Puny</tt><big>(</big><em>unicode_string=None</em><big>)</big><a class="reference internal" href="_modules/roster_core/punycode_lib.html#Uni2Puny"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.punycode_lib.Uni2Puny" title="Permalink to this definition">¶</a></dt>
<dd><p>Converts a unicode domain into a punycoded domain.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd>unicode/string: String or unicode of domain.</dd>
<dt>Outputs:</dt>
<dd>string: A punycoded domain string.</dd>
</dl>
</dd></dl>

</div>
<div class="section" id="module-roster_core.user">
<span id="user-module"></span><h2><tt class="xref py py-mod docutils literal"><span class="pre">user</span></tt> Module<a class="headerlink" href="#module-roster_core.user" title="Permalink to this headline">¶</a></h2>
<p>Classes pertaining to users and authorization for Roster.</p>
<p>Authorization for specific functions and for specific domain/ip range blocks
is handled in this module.</p>
<dl class="class">
<dt id="roster_core.user.User">
<em class="property">class </em><tt class="descclassname">roster_core.user.</tt><tt class="descname">User</tt><big>(</big><em>user_name</em>, <em>db_instance</em>, <em>log_instance</em><big>)</big><a class="reference internal" href="_modules/roster_core/user.html#User"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.user.User" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>Representation of a user, with basic manipulation methods.
Note that is it not necessary to authenticate a user to construct this
class. This class is mainly responsible for authorization.</p>
<dl class="method">
<dt id="roster_core.user.User.Authorize">
<tt class="descname">Authorize</tt><big>(</big><em>method</em>, <em>record_data=None</em>, <em>current_transaction=False</em><big>)</big><a class="reference internal" href="_modules/roster_core/user.html#User.Authorize"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.user.User.Authorize" title="Permalink to this definition">¶</a></dt>
<dd><p>Check to see if the user is authorized to run the given operation.</p>
<dl class="docutils">
<dt>Inputs:</dt>
<dd><p class="first">method:   what the user&#8217;s trying to do
record_data: dictionary of target, zone_name, view_name, record_type,</p>
<blockquote>
<div><p>and record_args_dict for the record that is being modified.
{&#8216;target&#8217;: &#8216;test_target&#8217;,</p>
<blockquote>
<div><p>&#8216;zone_name&#8217;: &#8216;test_zone&#8217;,
&#8216;view_name&#8217;: &#8216;test_view&#8217;,
&#8216;record_type&#8217;: &#8216;a&#8217;,
&#8216;record_args_dict&#8217; : {</p>
<blockquote>
<div><blockquote>
<div>u&#8217;assignment_ip&#8217; : &#8216;192.168.1.1&#8217;</div></blockquote>
<p>}</p>
</div></blockquote>
</div></blockquote>
<p>}</p>
</div></blockquote>
<dl class="last docutils">
<dt>current_transaction: bool of if this function is run from inside a</dt>
<dd>transaction in the db_access class</dd>
</dl>
</dd>
<dt>Raises:</dt>
<dd>MaintenanceError: Roster is currently under maintenance.
MissingDataTypeError: Incomplete record data provided for access method.
AuthorizationError: Authorization failure.</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.user.User.GetPermissions">
<tt class="descname">GetPermissions</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/roster_core/user.html#User.GetPermissions"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.user.User.GetPermissions" title="Permalink to this definition">¶</a></dt>
<dd><p>Return permissions and groups for user.</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd><dl class="first last docutils">
<dt>dictionary of permissions</dt>
<dd><p class="first">example:
{&#8216;user_access_level&#8217;: &#8216;2&#8217;,</p>
<blockquote class="last">
<div><p>&#8216;user_name&#8217;: &#8216;shuey&#8217;,
&#8216;forward_zones&#8217;: [</p>
<blockquote>
<div>{&#8216;zone_name&#8217;: &#8216;cs.university.edu&#8217;, &#8216;group_permission&#8217;: &#8216;rw&#8217;},
{&#8216;zone_name&#8217;: &#8216;eas.university.edu&#8217;, &#8216;group_permission&#8217;: &#8216;r&#8217;},
{&#8216;zone_name&#8217;: &#8216;bio.university.edu&#8217;, &#8216;group_permission&#8217;: &#8216;rw&#8217;}],</div></blockquote>
<p>&#8216;groups&#8217;: [&#8216;cs&#8217;, &#8216;bio&#8217;],
&#8216;reverse_ranges&#8217;: [</p>
<blockquote>
<div><dl class="docutils">
<dt>{&#8216;cidr_block&#8217;: &#8216;192.168.0.0/24&#8217;,</dt>
<dd>&#8216;group_permission&#8217;: &#8216;rw&#8217;},</dd>
<dt>{&#8216;cidr_block&#8217;: &#8216;192.168.0.0/24&#8217;,</dt>
<dd>&#8216;group_permission&#8217;: &#8216;r&#8217;},</dd>
<dt>{&#8216;cidr_block&#8217;: &#8216;192.168.1.0/24&#8217;,</dt>
<dd>&#8216;group_permission&#8217;: &#8216;rw&#8217;}]}</dd>
</dl>
</div></blockquote>
</div></blockquote>
</dd>
</dl>
</dd>
</dl>
</dd></dl>

<dl class="method">
<dt id="roster_core.user.User.GetUserName">
<tt class="descname">GetUserName</tt><big>(</big><big>)</big><a class="reference internal" href="_modules/roster_core/user.html#User.GetUserName"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#roster_core.user.User.GetUserName" title="Permalink to this definition">¶</a></dt>
<dd><p>Return user name for current session.</p>
<dl class="docutils">
<dt>Outputs:</dt>
<dd>string: user name</dd>
</dl>
</dd></dl>

</dd></dl>

</div>
</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
  <h3><a href="index.html">Table Of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">roster_core Package</a><ul>
<li><a class="reference internal" href="#id1"><tt class="docutils literal"><span class="pre">roster_core</span></tt> Package</a></li>
<li><a class="reference internal" href="#module-roster_core.audit_log"><tt class="docutils literal"><span class="pre">audit_log</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-roster_core.config"><tt class="docutils literal"><span class="pre">config</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-roster_core.constants"><tt class="docutils literal"><span class="pre">constants</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-roster_core.core"><tt class="docutils literal"><span class="pre">core</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-roster_core.core_helpers"><tt class="docutils literal"><span class="pre">core_helpers</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-roster_core.data_validation"><tt class="docutils literal"><span class="pre">data_validation</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-roster_core.db_access"><tt class="docutils literal"><span class="pre">db_access</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-roster_core.embedded_files"><tt class="docutils literal"><span class="pre">embedded_files</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-roster_core.errors"><tt class="docutils literal"><span class="pre">errors</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-roster_core.helpers_lib"><tt class="docutils literal"><span class="pre">helpers_lib</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-roster_core.punycode_lib"><tt class="docutils literal"><span class="pre">punycode_lib</span></tt> Module</a></li>
<li><a class="reference internal" href="#module-roster_core.user"><tt class="docutils literal"><span class="pre">user</span></tt> Module</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="index.html"
                        title="previous chapter">Welcome to Roster Core&#8217;s documentation!</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/roster_core.txt"
           rel="nofollow">Show Source</a></li>
  </ul>
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="index.html" title="Welcome to Roster Core’s documentation!"
             >previous</a> |</li>
        <li><a href="index.html">Roster Core v0.18 documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2013, Purdue University.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2b1.
    </div>
  </body>
</html>